Thread (8 messages) 8 messages, 5 authors, 2025-11-03

Re: [PATCH v3] block: Remove queue freezing from several sysfs store callbacks

From: Nilay Shroff <hidden>
Date: 2025-11-03 05:15:01
Also in: stable


On 11/3/25 9:42 AM, Ming Lei wrote:
On Fri, Oct 31, 2025 at 8:40 PM Nilay Shroff [off-list ref] wrote:
quoted


On 10/30/25 10:54 PM, Bart Van Assche wrote:
quoted
Fix this by removing the blk_mq_freeze_queue() / blk_mq_unfreeze_queue()
calls from the store callbacks that do not strictly need these callbacks.
This patch may cause a small delay in applying the new settings.

This patch affects the following sysfs attributes:
* io_poll_delay
* io_timeout
* nomerges
* read_ahead_kb
* rq_affinity
I see that io_timeout, nomerges and rq_affinity are all accessed
during I/O hotpath. So IMO for these attributes we still need to
freeze the queue before updating those parameters. The io_timeout
and nomerges are accessed during I/O submission and rq_affinity
is accessed during I/O completion.
Does freeze make any difference? Intermediate value isn't possible, and
either the old or new value should be just fine to take.
Yes it doesn't affect the I/O and so if we remove freeze/unfreeze 
calls for these attributes then we may still need to annotate 
it with data_race and/or READ_ONCE as Christoph mentioned in another 
thread. I saw that nomerges and rq_affinity already uses atomic
bitmap and so we may still need to annotate io_timeout.

Thanks,
--Nilay
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help