From: Danilo Krummrich <dakr@kernel.org>
To: phasta@kernel.org
Cc: "Christian König" <christian.koenig@amd.com>,
"Pierre-Eric Pelloux-Prayer" <pierre-eric.pelloux-prayer@amd.com>,
alexander.deucher@amd.com, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v1] drm/amdgpu: give each kernel job a unique id
Date: Fri, 13 Jun 2025 10:42:20 +0200 [thread overview]
Message-ID: <aEvkbKGaZD2NQggd@pollux> (raw)
In-Reply-To: <a495f31526f19457f44d502cf2de98ab0de33383.camel@mailbox.org>
On Fri, Jun 13, 2025 at 10:29:35AM +0200, Philipp Stanner wrote:
> Shouldn't the xarray be used nowadays for ID allocation? I think
> idr_alloc_cyclic() (ida_alloc_cyclic() doesn't exist) is just a wrapper
> around the xarray anyways.
Yes, IDR is basically xarray under the hood. But, a raw xarray (or IDR) is
unnecessary overhead, since we don't need to store pointers.
While IDA also uses xarray under the hood, it does perform some tricks to
provide only ID numbers, but much more efficiently.
Given that there's no ida_alloc_cyclic(), the atomic is probably fine, even
though, ida_alloc_cyclic() doesn't sound like a bad idea to add in general.
But maybe it's difficult due to some of the optimization tricks IDA performs.
I think we should stick to the atomic for now, but add a proper API to reserve
kernel IDs.
next prev parent reply other threads:[~2025-06-13 8:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-04 12:28 [PATCH v1] drm/amdgpu: give each kernel job a unique id Pierre-Eric Pelloux-Prayer
2025-06-10 13:05 ` Christian König
2025-06-11 14:25 ` Danilo Krummrich
2025-06-11 14:57 ` Christian König
2025-06-11 15:11 ` Danilo Krummrich
2025-06-12 7:00 ` Christian König
2025-06-12 23:48 ` Danilo Krummrich
2025-06-13 7:51 ` Pierre-Eric Pelloux-Prayer
2025-06-13 8:31 ` Danilo Krummrich
2025-06-13 8:23 ` Christian König
2025-06-13 8:29 ` Philipp Stanner
2025-06-13 8:42 ` Danilo Krummrich [this message]
2025-06-13 8:35 ` Danilo Krummrich
2025-06-13 9:27 ` Pierre-Eric Pelloux-Prayer
2025-06-13 11:48 ` Danilo Krummrich
2025-06-18 9:18 ` Pierre-Eric Pelloux-Prayer
2025-07-02 9:23 ` Pierre-Eric Pelloux-Prayer
2025-07-02 9:42 ` Danilo Krummrich
2025-08-01 15:34 ` Alex Deucher
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=aEvkbKGaZD2NQggd@pollux \
--to=dakr@kernel.org \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=phasta@kernel.org \
--cc=pierre-eric.pelloux-prayer@amd.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.