Re: [PATCH v7 07/26] rust: alloc: implement `KVmalloc` allocator

Benno Lossin
2024-09-26T13:07:31Z

On 12.09.24 00:52, Danilo Krummrich wrote:
> Implement `Allocator` for `KVmalloc`, an `Allocator` that tries to
> allocate memory wth `kmalloc` first and, on failure, falls back to
> `vmalloc`.
>
> All memory allocations made with `KVmalloc` end up in
> `kvrealloc_noprof()`; all frees in `kvfree()`.
>
> Reviewed-by: Alice Ryhl <aliceryhl@google.com>
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
> ---
> rust/helpers/slab.c | 6 +++++
> rust/kernel/alloc/allocator.rs | 35 +++++++++++++++++++++++++++++
> rust/kernel/alloc/allocator_test.rs | 1 +
> 3 files changed, 42 insertions(+)

Reviewed-by: Benno Lossin <benno.lossin@proton.me>

---
Cheers,
Benno