Re: [PATCH v5 13/22] gpu: nova-core: vbios: store PMU lookup entries in a KVVec

From: Eliot Courtney

Date: Mon May 25 2026 - 21:05:33 EST


On Mon May 25, 2026 at 11:29 PM JST, Danilo Krummrich wrote:
> On 5/25/26 3:57 PM, Eliot Courtney wrote:
>> - table_data: KVec<u8>,
>> + entries: KVVec<PmuLookupTableEntry>,
> Here an in at least one other place the patch series changes kmalloc() to
> kvmalloc(). Do we really expect this to potentially exceed KMALLOC_MAX_SIZE?

It won't exceed KMALLOC_MAX_SIZE, AFAICT. IIUC KVVec tries kmalloc
first then falls back to vmalloc. Is there a disadvantage to using KVVec?

In this case we don't need the memory to be physically contiguous, so I
thought it would be best to try to document that in the type.

But yeah please LMK if the above reasoning is wrong, I can change it
back to KVec. I didn't see any existing guidelines for this for rust -
if we want to choose based on the expected size of the allocation, then
I think KVec is the right choice. If we want to choose based on the
guarantees/contract (physically contiguous memory) then I think KVVec
makes more sense.