Skip to content

block: don't quiesce the queue when setting the default elevator - #1382

Closed
ghost wants to merge 1 commit into
linus-master_basefrom
series/1177359=>linus-master
Closed

ghost wants to merge 1 commit into
linus-master_basefrom
series/1177359=>linus-master

Conversation

@ghost

@ghost ghost commented Oct 1, 2026

Copy link
Copy Markdown

Pull request for series with
subject: block: don't quiesce the queue when setting the default elevator
version: 1
url: https://patchwork.kernel.org/series/1177359/

@ghost

ghost commented Oct 1, 2026

Copy link
Copy Markdown
Author

Upstream branch: 72d3fcf
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost

ghost commented Oct 1, 2026

Copy link
Copy Markdown
Author

Upstream branch: 551c722
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from e9dc365 to 1e1a43e Compare October 1, 2026 15:22
@ghost
ghost force-pushed the linus-master_base branch from eebb5bc to bbd3af0 Compare October 1, 2026 23:18
@ghost

ghost commented Oct 1, 2026

Copy link
Copy Markdown
Author

Upstream branch: ce1e022
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from 1e1a43e to f8c2578 Compare October 1, 2026 23:22
@ghost
ghost force-pushed the linus-master_base branch from bbd3af0 to a9c0b46 Compare October 3, 2026 09:37
@ghost

ghost commented Oct 3, 2026

Copy link
Copy Markdown
Author

Upstream branch: e767a4e
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from f8c2578 to efc90f4 Compare October 3, 2026 09:39
@ghost
ghost force-pushed the linus-master_base branch from a9c0b46 to 72d0f5e Compare October 3, 2026 21:50
@ghost

ghost commented Oct 3, 2026

Copy link
Copy Markdown
Author

Upstream branch: a74306e
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from efc90f4 to 5b6a9ec Compare October 3, 2026 21:53
@ghost ghost added V1-ci-pass and removed V1-ci-fail labels Oct 5, 2026
@ghost
ghost force-pushed the linus-master_base branch from 72d0f5e to d980ad5 Compare October 5, 2026 02:03
@ghost

ghost commented Oct 5, 2026

Copy link
Copy Markdown
Author

Upstream branch: None
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from 5b6a9ec to b6da652 Compare October 5, 2026 02:06
@ghost
ghost force-pushed the linus-master_base branch from d980ad5 to 83b99cc Compare October 6, 2026 12:35
@ghost

ghost commented Oct 6, 2026

Copy link
Copy Markdown
Author

Upstream branch: 22430ae
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from b6da652 to bcc8e10 Compare October 6, 2026 12:38
@ghost
ghost force-pushed the linus-master_base branch from 83b99cc to 9081535 Compare October 6, 2026 16:58
@ghost

ghost commented Oct 6, 2026

Copy link
Copy Markdown
Author

Upstream branch: 69f80fe
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from bcc8e10 to 570669c Compare October 6, 2026 17:01
@ghost
ghost force-pushed the linus-master_base branch from 9081535 to 6118c5c Compare October 7, 2026 15:18
@ghost

ghost commented Oct 7, 2026

Copy link
Copy Markdown
Author

Upstream branch: 7b63ef2
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost

ghost commented Oct 19, 2026

Copy link
Copy Markdown
Author

Upstream branch: c03c1a1
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from 1a19b9b to 4caba3f Compare October 19, 2026 00:40
@ghost
ghost force-pushed the linus-master_base branch from 90ea7e4 to 435b194 Compare October 22, 2026 07:21
@ghost

ghost commented Oct 22, 2026

Copy link
Copy Markdown
Author

Upstream branch: 7be4bc5
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from 4caba3f to 296372d Compare October 22, 2026 08:07
@ghost
ghost force-pushed the linus-master_base branch from 435b194 to fd67522 Compare October 24, 2026 03:36
@ghost

ghost commented Oct 24, 2026

Copy link
Copy Markdown
Author

Upstream branch: 17bb0e2
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from 296372d to ba4277f Compare October 24, 2026 04:14
@ghost
ghost force-pushed the linus-master_base branch from fd67522 to 3b53a63 Compare October 26, 2026 01:52
@ghost

ghost commented Oct 26, 2026

Copy link
Copy Markdown
Author

Upstream branch: 21a7f44
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from ba4277f to ed46d96 Compare October 26, 2026 02:35
@ghost
ghost force-pushed the linus-master_base branch from 3b53a63 to 5d84576 Compare October 26, 2026 07:01
@ghost

ghost commented Oct 26, 2026

Copy link
Copy Markdown
Author

Upstream branch: 6b4b543
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from ed46d96 to a5ab4cb Compare October 26, 2026 07:36
@ghost
ghost force-pushed the linus-master_base branch from 5d84576 to 6582ed2 Compare October 26, 2026 18:11
@ghost

ghost commented Oct 26, 2026

Copy link
Copy Markdown
Author

Upstream branch: fb2c3f4
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from a5ab4cb to 42b421d Compare October 26, 2026 19:03
@ghost
ghost force-pushed the linus-master_base branch from 6582ed2 to b3a1abc Compare October 26, 2026 23:55
@ghost

ghost commented Oct 27, 2026

Copy link
Copy Markdown
Author

Upstream branch: d135ab4
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from 42b421d to 913deb3 Compare October 27, 2026 00:26
@ghost
ghost force-pushed the linus-master_base branch from b3a1abc to 712496f Compare October 28, 2026 23:34
@ghost

ghost commented Oct 29, 2026

Copy link
Copy Markdown
Author

Upstream branch: c339f40
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from 913deb3 to c436e7b Compare October 29, 2026 00:06
@ghost
ghost force-pushed the linus-master_base branch from 712496f to a186880 Compare October 30, 2026 13:52
elevator_set_default() runs from blk_register_queue() while the disk is
still being added: the block device is not visible yet and uevents are
suppressed, so no file system I/O can be issued. elevator_change()
freezes the queue and cancels the dispatch work before switching, which
is enough to drain dispatch activity from passthrough requests, as the
comment in elevator_change() already states.

elevator_switch() still quiesces the queue unconditionally, though, so
every disk added with a default elevator waits for an RCU grace period.
Commit 245a489 ("block: avoid to quiesce queue in
elevator_init_mq") had removed this wait from the default elevator
setup, and it came back when that setup was folded into
elevator_change().

The wait is paid in full by callers that add disks one at a time. ublk
adds the disk of a single-queue device from START_DEV, which takes 7.7ms
at p50 in a 16 vCPU KVM guest, most of it in blk_mq_quiesce_queue()
called from elevator_set_default().

Skip quiescing in elevator_switch() when setting the default elevator.

ublk null target, 1000 single-queue devices created one by one:

                     before      after
  START_DEV p50      7.74ms     0.68ms
  START_DEV p99     14.61ms     1.32ms
  devices/s             114        971

Fixes: 1e44bed ("block: unifying elevator change")
Cc: stable@vger.kernel.org
Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com>
Reviewed-by: Ming Lei <tom.leiming@gmail.com>
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
@ghost

ghost commented Oct 30, 2026

Copy link
Copy Markdown
Author

Upstream branch: d89e1d1
series: https://patchwork.kernel.org/series/1177359/
version: 1

@ghost
ghost force-pushed the series/1177359=>linus-master branch from c436e7b to f93116f Compare October 30, 2026 14:58
@ghost

ghost commented Oct 31, 2026

Copy link
Copy Markdown
Author

At least one diff in series https://patchwork.kernel.org/series/1177359/ irrelevant now for [{'archived': False, 'project': 241}] search patterns

@ghost ghost closed this Oct 31, 2026
@ghost
ghost deleted the series/1177359=>linus-master branch November 2, 2026 18:08
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants