[PATCH 01/12] kho: generalize radix tree APIs

Pratyush Yadav pratyush at kernel.org
Tue May 5 05:54:28 PDT 2026


On Tue, May 05 2026, Jork Loeser wrote:

> On Wed, 29 Apr 2026, Pratyush Yadav wrote:
>
>> From: "Pratyush Yadav (Google)" <pratyush at kernel.org>
>>
>> The KHO radix tree is a data structure that can track the presence or
>> absence of an arbitrary key, with nothing inherently tied to KHO memory
>> preservation tracking. This was one of the design goals of the radix
>> tree. This was done to enable it to be re-used by other users of KHO.
>
> "Arbitrary key": Not quite the complete 64-bits, rather 64 - PAGE_SIZE, correct?

Right, 64 - PAGE_SHIFT.

>
>> + * kho_radix_add_key - Add a key to the radix tree.
>>  * @tree: The KHO radix tree.
>> + * @key: The key to add.
>>  *
>> + * This function traverses the radix tree based on the key provided. It sets the
>> + * corresponding bit in the leaf bitmap to mark the key as present. If
>> + * intermediate nodes do not exist along the path, they are allocated and added
>> + * to the tree.
>
> Consider adding a note on the key-width limitation.

I think adding a runtime check would also be a good idea here.

-- 
Regards,
Pratyush Yadav



More information about the kexec mailing list