From: "Danilo Krummrich" <dakr@kernel.org>
To: "John Hubbard" <jhubbard@nvidia.com>,
"Matthew Wilcox" <willy@infradead.org>
Cc: "Gary Guo" <gary@garyguo.net>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Joel Fernandes" <joelagnelf@nvidia.com>,
"Alistair Popple" <apopple@nvidia.com>,
"Eliot Courtney" <ecourtney@nvidia.com>,
"Zhi Wang" <zhiw@nvidia.com>, "Simona Vetter" <simona@ffwll.ch>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
nouveau@lists.freedesktop.org, rust-for-linux@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gpu: nova-core: fix aux device registration for multi-GPU systems
Date: Thu, 05 Feb 2026 15:19:49 +0100 [thread overview]
Message-ID: <DG73EB8091J4.3SFPDC5TLH0M7@kernel.org> (raw)
In-Reply-To: <aYSfpf3xZNwZhzXs@casper.infradead.org>
On Thu Feb 5, 2026 at 2:48 PM CET, Matthew Wilcox wrote:
> On Thu, Feb 05, 2026 at 01:44:27PM +0000, Gary Guo wrote:
>> > Fix this by using an atomic counter to generate unique IDs for each
>> > GPU's aux device registration. The TODO item to eventually use XArray
>> > for recycling aux device IDs is retained, but for now, this works very
>> > nicely.
>> >
>> > This has the side effect of making debugfs[1] work on multi-GPU systems.
>>
>> Hi John,
>>
>> Looks like this is something that should be achieved via IDA?
>
> Yes, if you have no need to go from ID to pointer, an IDA is better.
> That said, as far as I understand what this code is doing, an atomic_t
> solves the problem just fine and is cheaper.
I agree, for now an atomic should be perfectly fine. Though, with enough
patience binding/unbinding the driver from sysfs you can probably make this
overflow. :)
The reason for the Xarray TODO is that it is one option for a place where
nova-core can store nova-drm / vGPU specific data, once either vGPU or nova-drm
attaches to the auxiliary device. But I think there may be better alternatives.
WARNING: multiple messages have this Message-ID (diff)
From: "Danilo Krummrich" <dakr@kernel.org>
To: "John Hubbard" <jhubbard@nvidia.com>,
"Matthew Wilcox" <willy@infradead.org>
Cc: "Gary Guo" <gary@garyguo.net>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Joel Fernandes" <joelagnelf@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>,
"Alistair Popple" <apopple@nvidia.com>,
"Eliot Courtney" <ecourtney@nvidia.com>,
"Zhi Wang" <zhiw@nvidia.com>, "David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
nouveau@lists.freedesktop.org, rust-for-linux@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gpu: nova-core: fix aux device registration for multi-GPU systems
Date: Thu, 05 Feb 2026 15:19:49 +0100 [thread overview]
Message-ID: <DG73EB8091J4.3SFPDC5TLH0M7@kernel.org> (raw)
In-Reply-To: <aYSfpf3xZNwZhzXs@casper.infradead.org>
On Thu Feb 5, 2026 at 2:48 PM CET, Matthew Wilcox wrote:
> On Thu, Feb 05, 2026 at 01:44:27PM +0000, Gary Guo wrote:
>> > Fix this by using an atomic counter to generate unique IDs for each
>> > GPU's aux device registration. The TODO item to eventually use XArray
>> > for recycling aux device IDs is retained, but for now, this works very
>> > nicely.
>> >
>> > This has the side effect of making debugfs[1] work on multi-GPU systems.
>>
>> Hi John,
>>
>> Looks like this is something that should be achieved via IDA?
>
> Yes, if you have no need to go from ID to pointer, an IDA is better.
> That said, as far as I understand what this code is doing, an atomic_t
> solves the problem just fine and is cheaper.
I agree, for now an atomic should be perfectly fine. Though, with enough
patience binding/unbinding the driver from sysfs you can probably make this
overflow. :)
The reason for the Xarray TODO is that it is one option for a place where
nova-core can store nova-drm / vGPU specific data, once either vGPU or nova-drm
attaches to the auxiliary device. But I think there may be better alternatives.
next prev parent reply other threads:[~2026-02-05 14:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-05 4:11 [PATCH] gpu: nova-core: fix aux device registration for multi-GPU systems John Hubbard
2026-02-05 4:11 ` John Hubbard
2026-02-05 4:16 ` John Hubbard
2026-02-05 4:16 ` John Hubbard
2026-02-05 13:44 ` Gary Guo
2026-02-05 13:44 ` Gary Guo
2026-02-05 13:48 ` Matthew Wilcox
2026-02-05 13:48 ` Matthew Wilcox
2026-02-05 14:19 ` Danilo Krummrich [this message]
2026-02-05 14:19 ` Danilo Krummrich
2026-02-05 21:44 ` John Hubbard
2026-02-05 21:44 ` John Hubbard
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=DG73EB8091J4.3SFPDC5TLH0M7@kernel.org \
--to=dakr@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=bhelgaas@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=joelagnelf@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tmgross@umich.edu \
--cc=willy@infradead.org \
--cc=zhiw@nvidia.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.