mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>, 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, 5 Feb 2026 13:44:07 -0800	[thread overview]
Message-ID: <36698be6-d260-41e3-904d-61e3be5463d0@nvidia.com> (raw)
In-Reply-To: <DG73EB8091J4.3SFPDC5TLH0M7@kernel.org>

On 2/5/26 6:19 AM, Danilo Krummrich wrote:
> 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.

OK, this seems like enough information to post a v2, thanks!

thanks,
-- 
John Hubbard


      reply	other threads:[~2026-02-05 21:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05  4:11 John Hubbard
2026-02-05  4:16 ` John Hubbard
2026-02-05 13:44 ` Gary Guo
2026-02-05 13:48   ` Matthew Wilcox
2026-02-05 14:19     ` Danilo Krummrich
2026-02-05 21:44       ` John Hubbard [this message]

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=36698be6-d260-41e3-904d-61e3be5463d0@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.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=dakr@kernel.org \
    --cc=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --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=ttabi@nvidia.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®