From: "Eliot Courtney" <ecourtney@nvidia.com>
To: "Alexandre Courbot" <acourbot@nvidia.com>,
"John Hubbard" <jhubbard@nvidia.com>
Cc: "Eliot Courtney" <ecourtney@nvidia.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Lorenzo Stoakes" <ljs@kernel.org>,
"Vlastimil Babka" <vbabka@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
"Uladzislau Rezki" <urezki@gmail.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"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>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tamir Duberstein" <tamird@kernel.org>,
"Onur Özkan" <work@onurozkan.dev>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Alistair Popple" <apopple@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org,
dri-devel <dri-devel-bounces@lists.freedesktop.org>
Subject: Re: [PATCH v3 4/8] gpu: nova-core: add NVKV encoder
Date: Tue, 13 Oct 2026 16:08:34 +0900 [thread overview]
Message-ID: <DM3ISBKLJ754.GDSHT5NYU0G5@nvidia.com> (raw)
In-Reply-To: <DLYL5E2GFSM7.3SMUQUX8LN0C1@nvidia.com>
On Wed Oct 7, 2026 at 8:56 PM JST, Alexandre Courbot wrote:
> On Wed Oct 7, 2026 at 8:33 PM JST, John Hubbard wrote:
>> On 10/7/26 5:48 AM, Alexandre Courbot wrote:
>>> On Wed Oct 7, 2026 at 12:43 PM JST, Alexandre Courbot wrote:
>>>> On Mon Sep 28, 2026 at 5:42 PM JST, Eliot Courtney wrote:
>>>> <...>
>>>> ... and that's all I could find on this patch. I particularly like how
>>>> the examples have turned out!
>>>
>>> ... although maybe the Sashiko comments are worth considering too. Nova
>>> does depend on little-endian, but it probably wouldn't cost us much to
>>> e.g. call `to_le_bytes` instead of `to_ne_bytes` to make the code more
>>> portable.
>>
>> I recall having this conversation before, and I've tried to consistently
>> say "no". It's not a real thing, and if it ever becomes one it will be
>> a very big deal, not something we would overlook.
>
> I agree on principle when writing endian-neutral code requires some
> extra infrastructure or considerably more code, but here we are talking
> about trading a call to `to_ne_bytes` for one to `to_le_bytes`, which is
> zero effort.
>
> ... although the Sashiko warning on `extend_with_padding` *would*
> require more than just a method call to properly manage arrays of `u32`
> and `u64`, so maybe we don't need to fix them all, or any at all for
> that matter since half-fixed code is still broken code.
If I see some code that is explicitly written to handle endianness, it's
confusing, because it implies that some or all of the code is meant to
work with variable endianness. But that's not the case, and would leave
me wondering why just this bit was written in an endianness-neutral way.
I think we agree on this part though.
For the case where it requires no extra effort, e.g. `to_ne_bytes` vs
`to_le_bytes`, I think we shouldn't use review time on it. So IMO
`to_le_bytes` is conceptually slightly more correct here because NVKV is
little endian regardless of the host CPU, but I would not want to use
review time on this in the future because:
1. it's wonky to change just some of the handling, and changing more (as
you've noted) can require extra infra/copies/affect performance.
2. I think assessing each `to_*_bytes` call every time it comes up for
which one is more conceptually correct (is it host-related, or
GSP-related, or if it's both, which one to choose since we're not
going to bother adding extra infra for it) is just gonna waste review
time.
next prev parent reply other threads:[~2026-10-13 7:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 8:42 [PATCH v3 0/8] gpu: nova-core: add NVKV codec Eliot Courtney
2026-09-28 8:42 ` [PATCH v3 1/8] rust: alloc: add Vec::try_push_init Eliot Courtney
2026-10-06 5:52 ` Alexandre Courbot
2026-10-13 6:22 ` Eliot Courtney
2026-09-28 8:42 ` [PATCH v3 2/8] rust: alloc: add Vec::push_init Eliot Courtney
2026-10-06 6:10 ` Alexandre Courbot
2026-09-28 8:42 ` [PATCH v3 3/8] rust: alloc: add ArrayVec Eliot Courtney
2026-10-07 6:27 ` Alexandre Courbot
2026-10-13 9:13 ` Eliot Courtney
2026-09-28 8:42 ` [PATCH v3 4/8] gpu: nova-core: add NVKV encoder Eliot Courtney
2026-10-07 3:43 ` Alexandre Courbot
2026-10-07 3:48 ` Alexandre Courbot
2026-10-07 11:33 ` John Hubbard
2026-10-07 11:56 ` Alexandre Courbot
2026-10-13 7:08 ` Eliot Courtney [this message]
2026-09-28 8:42 ` [PATCH v3 5/8] gpu: nova-core: add NVKV decoder Eliot Courtney
2026-10-07 4:51 ` Alexandre Courbot
2026-10-13 8:26 ` Eliot Courtney
2026-09-28 8:42 ` [PATCH v3 6/8] gpu: nova-core: add NVKV typed encoding Eliot Courtney
2026-10-07 6:30 ` Alexandre Courbot
2026-09-28 8:42 ` [PATCH v3 7/8] gpu: nova-core: add NVKV typed decoding Eliot Courtney
2026-10-07 6:30 ` Alexandre Courbot
2026-10-07 12:05 ` Alexandre Courbot
2026-09-28 8:42 ` [PATCH v3 8/8] gpu: nova-core: add NVKV GSP_INIT schemas Eliot Courtney
2026-10-07 10:53 ` Alexandre Courbot
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=DM3ISBKLJ754.GDSHT5NYU0G5@nvidia.com \
--to=ecourtney@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel-bounces@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ljs@kernel.org \
--cc=lossin@kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=ttabi@nvidia.com \
--cc=urezki@gmail.com \
--cc=vbabka@kernel.org \
--cc=work@onurozkan.dev \
/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