From: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Christian König <christian.koenig@amd.com>,
Alex Deucher <alexander.deucher@amd.com>,
lijo.lazar@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
Subject: Re: [PATCH v7] drm/amdgpu: replace PASID IDR with XArray
Date: Tue, 31 Mar 2026 22:12:51 +0500 [thread overview]
Message-ID: <CABXGCsNcRQnQmsZJAhfJPsR71HXU5+CG4URJiX03xkPJD+f7SA@mail.gmail.com> (raw)
In-Reply-To: <CADnq5_M-iwCHKJ+cnU1TQSc-aGJC465dwzWGQkhaZoSPz7Wu5g@mail.gmail.com>
On Tue, Mar 31, 2026 at 7:38 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> Applied. Thanks!
>
Hi Christian, Alex,
While testing v7, I noticed that xa_erase() and xa_alloc_cyclic()
use plain xa_lock()/xa_unlock() regardless of XA_FLAGS_LOCK_IRQ —
the flag only affects lockdep annotations, not runtime locking.
The XArray API provides separate _irq variants for this:
xa_alloc_cyclic_irq() and xa_erase_irq(), both defined as inlines
in include/linux/xarray.h using xa_lock_irq/xa_unlock_irq.
I confirmed this by hitting the same lockdep WARNING with v6
(which has the same locking), and by reading lib/xarray.c:
void *xa_erase(struct xarray *xa, unsigned long index)
{
xa_lock(xa); // plain spin_lock, not _irq
entry = __xa_erase(xa, index);
xa_unlock(xa);
return entry;
}
Should I send a v8 using xa_alloc_cyclic_irq() and xa_erase_irq()?
Thanks,
Mikhail
next prev parent reply other threads:[~2026-03-31 17:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 14:21 [PATCH v7] drm/amdgpu: replace PASID IDR with XArray Mikhail Gavrilov
2026-03-31 14:29 ` Christian König
2026-03-31 14:38 ` Alex Deucher
2026-03-31 17:12 ` Mikhail Gavrilov [this message]
2026-03-31 21:43 ` Claude review: " Claude Code Review Bot
2026-03-31 21:43 ` 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=CABXGCsNcRQnQmsZJAhfJPsR71HXU5+CG4URJiX03xkPJD+f7SA@mail.gmail.com \
--to=mikhail.v.gavrilov@gmail.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.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 \
/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