Re: [PATCH] rust: add a ring buffer implementation

From: Daniel Almeida

Date: Mon Feb 16 2026 - 08:55:27 EST



>
>>
>>> rust/kernel/lib.rs | 1 +
>>> rust/kernel/ringbuffer.rs | 321 ++++++++++++++++++++++++++++++++++++++++++++++
>>> 2 files changed, 322 insertions(+)
>>>
>>> diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
>>> index f812cf1200428..d6555ccceb32f 100644
>>> --- a/rust/kernel/lib.rs
>>> +++ b/rust/kernel/lib.rs
>>> @@ -133,6 +133,7 @@
>>> pub mod rbtree;
>>> pub mod regulator;
>>> pub mod revocable;
>>> +pub mod ringbuffer;
>>> pub mod scatterlist;
>>> pub mod security;
>>> pub mod seq_file;
>>> diff --git a/rust/kernel/ringbuffer.rs b/rust/kernel/ringbuffer.rs
>>> new file mode 100644
>>> index 0000000000000..9a66ebf1bb390
>>> --- /dev/null
>>> +++ b/rust/kernel/ringbuffer.rs
>>
>> This should probably be in rust/kernel/alloc/ next to Vec?
>
> Ok.

With the allocation being handled by a separate component, I don’t think
this is right. I think a better location is rust/kernel/io