On 2/20/2026 9:54 AM, Joel Fernandes wrote:
>
>
> On 2/20/2026 3:22 AM, Eliot Courtney wrote:
>> On Thu Feb 19, 2026 at 5:55 AM JST, Joel Fernandes wrote:
>>> +__rust_helper u64 rust_helper_gpu_buddy_block_size(struct gpu_buddy *mm,
>>> + struct gpu_buddy_block
>>> *block)
>>> +{
>>> + return gpu_buddy_block_size(mm, block);
>>> +}
>>> +
>>
>> Will `rust_helper_gpu_buddy_block_size` be used in the future? It
>> doesn't appear to be used in buddy.rs.
>
> I think it is worth keeping because it is a pretty basic API the underlying
> infrastructure. Finding the size of a block can be important in the future
> IMO. It is only few lines, no?
By the way, this can become important for non-contiguous physical memory
allocations where an allocation is split across different blocks. In that
case, we would the information size of each individual block, not just the
whole allocation. I could probably add a test case for that.
--
Joel Fernandes
- [PATCH v10 6/8] rust: gpu: Add GPU buddy allocator bindi... Joel Fernandes
- Re: [PATCH v10 6/8] rust: gpu: Add GPU buddy alloca... Alexandre Courbot
- Re: [PATCH v10 6/8] rust: gpu: Add GPU buddy al... Miguel Ojeda
- Re: [PATCH v10 6/8] rust: gpu: Add GPU budd... Joel Fernandes
- Re: [PATCH v10 6/8] rust: gpu: Add GPU buddy al... Joel Fernandes
- Re: [PATCH v10 6/8] rust: gpu: Add GPU budd... Alexandre Courbot
- Re: [PATCH v10 6/8] rust: gpu: Add GPU buddy alloca... Danilo Krummrich
- Re: [PATCH v10 6/8] rust: gpu: Add GPU buddy al... Joel Fernandes
- Re: [PATCH v10 6/8] rust: gpu: Add GPU buddy alloca... Eliot Courtney
- Re: [PATCH v10 6/8] rust: gpu: Add GPU buddy al... Joel Fernandes
- Re: [PATCH v10 6/8] rust: gpu: Add GPU budd... Joel Fernandes
- Re: [PATCH v10 6/8] rust: gpu: Add GPU budd... Danilo Krummrich
- Re: [PATCH v10 6/8] rust: gpu: Add GPU ... Joel Fernandes
- Re: [PATCH v10 6/8] rust: gpu: Add... Danilo Krummrich
- Re: [PATCH v10 0/8] Preparatory patches for nova-core me... Joel Fernandes
- Re: [PATCH v10 0/8] Preparatory patches for nova-core me... Danilo Krummrich
- Re: [PATCH v10 0/8] Preparatory patches for nova-co... Joel Fernandes
- Re: [PATCH v10 0/8] Preparatory patches for nov... Joel Fernandes
- Re: [PATCH v10 2/8] gpu: Move DRM buddy allocator one le... Alexandre Courbot
- Re: [PATCH v10 2/8] gpu: Move DRM buddy allocator o... Joel Fernandes
