Thread (5 messages) 5 messages, 4 authors, 20d ago

Re: [PATCH v1] ring-buffer: Clean up resize_disabled checks

flat view

From: Vincent Donnefort <hidden>
Date: 2026-09-15 07:24:01
Also in: lkml

On Mon, Sep 14, 2026 at 08:09:24PM +0100, David CARLIER wrote:
Hi Vincent.
quoted
+   if (rb_resize_disabled(buffer, cpu_id)) {
+           err = -EBUSY;
+           goto out_err_unlock;
+   }
For a single CPU, this now happens before the nr_pages == cpu_buffer->nr_pages
early exit, so writing the same size to per_cpu/cpuN/buffer_size_kb on a
mapped or persistent instance CPU fails with EBUSY instead of succeeding.
Intended ?
Actually no, I didn't see that it is also "fixing" this discrepancy between the
per_cpu buffer_size_kb and the global one.

It seems to me better to align the behaviour for both interface, but then it is
touching something that is user interface... 

Steven, WDYS?
quoted
Additionally, remove the unnecessary cpumask_test_cpu in
ring_buffer_subbuf_order_set().
The install loop still has one.

Otherwise removing the second check is fine, the hotplug window is
covered by the cpus_read_lock() patch I sent separately.

Cheers.
-- 
Vincent
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help