public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Hindborg <a.hindborg@kernel.org>
To: Danilo Krummrich <dakr@kernel.org>
Cc: "Daniel Almeida" <daniel.almeida@collabora.com>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] rust: add a ring buffer implementation
Date: Tue, 17 Feb 2026 20:10:48 +0100	[thread overview]
Message-ID: <87342zchjb.fsf@kernel.org> (raw)
In-Reply-To: <DGHB1VEL6XTH.2W3803V58FUSH@kernel.org>

"Danilo Krummrich" <dakr@kernel.org> writes:

> On Tue Feb 17, 2026 at 11:02 AM CET, Andreas Hindborg wrote:
>> We can change the code down the road, no problem. It's not set in stone
>> just because we merge it without generic alloc support.
>
> Just to avoid any ambiguity, we should merge it with generic allocator support,
> but aiming for arbitrary I/O backend support would be a bit too much.

Right.

>
>> Perhaps one could imagine a simple API like in this patch being provided
>> by a configurable implementation behind the scenes.
>
> Yeah, in the future we could implement the system memory specific one with a
> type alias on top of the I/O backend agnostic one. But it remains to see if this
> will actually work out properly or if it's even worth in terms of
> maintainability etc.
>
> (E.g. one of the limitations that I've mentioned already is that I/O backends do
> not support growing and shrinking of the backing memory. And I'm not yet sure if
> they ever should.)

This particular ringbuffer* implementation does not support changing the
capacity after initialization, so I don't see that being an issue. For
applications that need to scale the size of the ring dynamically, we
could have another type. Or a generic parameter, if that makes sense.

Best regards,
Andreas Hindborg


* VecDeque? This kind of structure has always been a ring to me.


  reply	other threads:[~2026-02-17 19:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-15 20:24 [PATCH] rust: add a ring buffer implementation Andreas Hindborg
2026-02-16  4:35 ` Daniel Almeida
2026-02-16  7:11   ` Andreas Hindborg
2026-02-16 11:44     ` Daniel Almeida
2026-02-16 12:25 ` Alice Ryhl
2026-02-16 12:43   ` Daniel Almeida
2026-02-16 13:27   ` Andreas Hindborg
2026-02-16 13:45     ` Daniel Almeida
2026-02-16 14:06       ` Danilo Krummrich
2026-02-16 14:21         ` Daniel Almeida
2026-02-16 14:39           ` Danilo Krummrich
2026-02-16 14:46             ` Daniel Almeida
2026-02-17 10:02               ` Andreas Hindborg
2026-02-17 14:26                 ` Danilo Krummrich
2026-02-17 19:10                   ` Andreas Hindborg [this message]
2026-02-17 19:25                     ` Daniel Almeida
2026-02-18  8:29                     ` Alice Ryhl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87342zchjb.fsf@kernel.org \
    --to=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox