mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] block: make changing to the current I/O scheduler cheap again
@ 2026-11-15  1:58 Qiliang Yuan
  2026-11-15  1:58 ` [PATCH v2 1/2] block: don't request a module for the none elevator Qiliang Yuan
  2026-11-15  1:58 ` [PATCH v2 2/2] block: return early when the elevator doesn't change Qiliang Yuan
  0 siblings, 2 replies; 3+ messages in thread
From: Qiliang Yuan @ 2026-11-15  1:58 UTC (permalink / raw)
  To: Jens Axboe, Damien Le Moal, Ming Lei, Nilay Shroff, Hannes Reinecke
  Cc: linux-block, linux-kernel, Qiliang Yuan, Christoph Hellwig

Writing the scheduler a queue already uses to queue/scheduler takes
about 10 ms and freezes the queue, which stalls I/O on live disks every
time a udev rule or tuning tool sets the scheduler unconditionally.

Patch 1 stops requesting a "none-iosched" module on every write of
"none". Patch 2 returns before freezing the queue when the elevator
wouldn't change.

On a null_blk disk (median of 20 writes, all kernels measured in the
same run):

  operation                   base (ms)  patch 1 (ms)  patch 1+2 (ms)
  none -> none                    13.10          9.11            0.08
  mq-deadline -> mq-deadline      10.95          9.05            0.08
  mq-deadline -> none             13.00          7.97            6.03

Signed-off-by: Qiliang Yuan <qiliang.yuan@linux.dev>
---
V1 -> V2:
- Keep the elevator check under the freeze and note the race in the
  comment, as Christoph suggested
- Say "change" instead of "rewrite" in the cover letter subject
- Rebase onto v7.4-rc2-470-g7e1392a42ea2 and update the numbers from a
  new run

v1: https://lore.kernel.org/r/20261111-bug-block-elevator-unchanged-v1-0-583198bd4e21@linux.dev

---
Qiliang Yuan (2):
      block: don't request a module for the none elevator
      block: return early when the elevator doesn't change

 block/elevator.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
---
base-commit: 7e1392a42ea288d70a266f6553fe06f57f8647ea
change-id: 20261111-bug-block-elevator-unchanged-a6cd2d761d38

Best regards,
-- 
Qiliang Yuan <qiliang.yuan@linux.dev>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-15  1:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-15  1:58 [PATCH v2 0/2] block: make changing to the current I/O scheduler cheap again Qiliang Yuan
2026-11-15  1:58 ` [PATCH v2 1/2] block: don't request a module for the none elevator Qiliang Yuan
2026-11-15  1:58 ` [PATCH v2 2/2] block: return early when the elevator doesn't change Qiliang Yuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®