From: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
To: "Lazar, Lijo" <lijo.lazar@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
Christian König <christian.koenig@amd.com>,
Eric Huang <jinhuieric.huang@amd.com>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
stable@vger.kernel.org
Subject: Re: [PATCH v4] drm/amdgpu: replace PASID IDR with XArray
Date: Tue, 31 Mar 2026 00:40:37 +0500 [thread overview]
Message-ID: <CABXGCsOguZU1k2zS7ngbAMYU10A-sWtoQLQ7P+ThiXR-7e_Crg@mail.gmail.com> (raw)
In-Reply-To: <d05a9c56-5248-462f-96b5-44ad167f284a@amd.com>
On Mon, Mar 30, 2026 at 10:33 PM Lazar, Lijo <lijo.lazar@amd.com> wrote:
>
> Sorry, I didn't mean to confuse. In v3, was only talking about
> alloc_cyclic call.
>
> As per the call trace posted, amdgpu_pasid_free() has a chance to be
> called from irq context and that may still use irq save/restore
> approach. Eric/Christian, could you confirm?
Hi Lijo,
You're right, xa_erase() uses plain xa_lock() without irqsave —
I verified in lib/xarray.c.
I've sent v5 which uses xa_lock_irqsave/__xa_erase for
amdgpu_pasid_free() since it can be called from hardirq via
amdgpu_pasid_free_cb. xa_alloc_cyclic() in amdgpu_pasid_alloc()
is kept as-is since it handles irq-safe locking internally.
https://lore.kernel.org/all/20260330191120.105065-1-mikhail.v.gavrilov@gmail.com/
Thanks for catching this.
--
Best Regards,
Mike Gavrilov.
next prev parent reply other threads:[~2026-03-30 19:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-30 14:50 [PATCH v4] drm/amdgpu: replace PASID IDR with XArray Mikhail Gavrilov
2026-03-30 17:32 ` Lazar, Lijo
2026-03-30 19:40 ` Mikhail Gavrilov [this message]
2026-03-31 7:08 ` Claude review: " Claude Code Review Bot
2026-03-31 7:08 ` Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABXGCsOguZU1k2zS7ngbAMYU10A-sWtoQLQ7P+ThiXR-7e_Crg@mail.gmail.com \
--to=mikhail.v.gavrilov@gmail.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jinhuieric.huang@amd.com \
--cc=lijo.lazar@amd.com \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox