public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 00/20] block: unify elevator changing and fix lockdep warning
@ 2025-04-18 16:36 Ming Lei
  2025-04-18 16:36 ` [PATCH V2 01/20] block: move blk_mq_add_queue_tag_set() after blk_mq_map_swqueue() Ming Lei
                   ` (19 more replies)
  0 siblings, 20 replies; 72+ messages in thread
From: Ming Lei @ 2025-04-18 16:36 UTC (permalink / raw)
  To: Jens Axboe, linux-block
  Cc: Nilay Shroff, Shinichiro Kawasaki, Thomas Hellström,
	Christoph Hellwig, Ming Lei

Hello Jens,

This patchset cleans up elevator change code, and unifying it via single
helper, meantime moves kobject_add/del & debugfs register/unregister out of
queue freezing & elevator_lock. This way fixes many lockdep warnings
reported recently, especially since fs_reclaim is connected with freeze lock
manually by commit ffa1e7ada456 ("block: Make request_queue lockdep splats
show up earlier").


Thanks,

V2:
	- retry add/del disk when blk_mq_update_nr_hw_queues() is in-progress

	- swap blk_mq_add_queue_tag_set() with blk_mq_map_swqueue() in
	blk_mq_init_allocated_queue() (Nilay Shroff)

	- move ELEVATOR_FLAG_DISABLE_WBT to request queue's flags (Nilay Shoff) 

	- fix race because of delaying elevator unregister

	- define flags of `elv_change_ctx` as `bool` (Christoph)

	- improve comment and commit log (Christoph)

Ming Lei (20):
  block: move blk_mq_add_queue_tag_set() after blk_mq_map_swqueue()
  block: move ELEVATOR_FLAG_DISABLE_WBT as request queue flag
  block: don't call freeze queue in elevator_switch() and
    elevator_disable()
  block: add two helpers for registering/un-registering sched debugfs
  block: move sched debugfs register into elvevator_register_queue
  block: add & pass 'struct gendisk_data' for retrying add/del disk in
    updating nr_hw_queues
  block: prevent adding/deleting disk during updating nr_hw_queues
  block: don't allow to switch elevator if updating nr_hw_queues is
    in-progress
  block: simplify elevator rebuild for updating nr_hw_queues
  block: add helper of elevator_change()
  block: move blk_unregister_queue() & device_del() after freeze wait
  block: add `struct elv_change_ctx` for unifying elevator_change
  block: unifying elevator change
  block: pass elevator_queue to elv_register_queue & unregister_queue
  block: fail to show/store elevator sysfs attribute if elevator is
    dying
  block: move elv_register[unregister]_queue out of elevator_lock
  block: move debugfs/sysfs register out of freezing queue
  block: remove several ->elevator_lock
  block: move hctx cpuhp add/del out of queue freezing
  block: move wbt_enable_default() out of queue freezing from sched
    ->exit()

 block/bfq-iosched.c    |   6 +-
 block/blk-mq-debugfs.c |  12 +--
 block/blk-mq-sched.c   |  41 +++++---
 block/blk-mq.c         | 172 ++++++++++--------------------
 block/blk-sysfs.c      |  18 ++--
 block/blk-wbt.c        |   3 +-
 block/blk.h            |  10 +-
 block/elevator.c       | 231 +++++++++++++++++++++++++++--------------
 block/elevator.h       |  19 +++-
 block/genhd.c          | 158 +++++++++++++++++-----------
 include/linux/blk-mq.h |   5 +
 include/linux/blkdev.h |   3 +
 12 files changed, 374 insertions(+), 304 deletions(-)

-- 
2.47.0


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

end of thread, other threads:[~2025-04-24  9:03 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-18 16:36 [PATCH V2 00/20] block: unify elevator changing and fix lockdep warning Ming Lei
2025-04-18 16:36 ` [PATCH V2 01/20] block: move blk_mq_add_queue_tag_set() after blk_mq_map_swqueue() Ming Lei
2025-04-19  8:57   ` Yu Kuai
2025-04-19 10:25   ` Nilay Shroff
2025-04-21 12:31   ` Christoph Hellwig
2025-04-22  6:00   ` Hannes Reinecke
2025-04-18 16:36 ` [PATCH V2 02/20] block: move ELEVATOR_FLAG_DISABLE_WBT as request queue flag Ming Lei
2025-04-19  8:59   ` Yu Kuai
2025-04-19 14:52   ` Nilay Shroff
2025-04-21 12:33   ` Christoph Hellwig
2025-04-22  6:01   ` Hannes Reinecke
2025-04-18 16:36 ` [PATCH V2 03/20] block: don't call freeze queue in elevator_switch() and elevator_disable() Ming Lei
2025-04-19  9:01   ` Yu Kuai
2025-04-21 12:34   ` Christoph Hellwig
2025-04-22  4:00     ` Ming Lei
2025-04-22  7:00       ` Christoph Hellwig
2025-04-22  6:02   ` Hannes Reinecke
2025-04-18 16:36 ` [PATCH V2 04/20] block: add two helpers for registering/un-registering sched debugfs Ming Lei
2025-04-19  9:18   ` Yu Kuai
2025-04-19 10:27   ` Nilay Shroff
2025-04-21 12:36   ` Christoph Hellwig
2025-04-22  6:04   ` Hannes Reinecke
2025-04-18 16:36 ` [PATCH V2 05/20] block: move sched debugfs register into elvevator_register_queue Ming Lei
2025-04-19  9:28   ` Yu Kuai
2025-04-19 10:28   ` Nilay Shroff
2025-04-21 12:37   ` Christoph Hellwig
2025-04-22  6:06   ` Hannes Reinecke
2025-04-18 16:36 ` [PATCH V2 06/20] block: add & pass 'struct gendisk_data' for retrying add/del disk in updating nr_hw_queues Ming Lei
2025-04-18 16:36 ` [PATCH V2 07/20] block: prevent adding/deleting disk during " Ming Lei
2025-04-19 11:20   ` Nilay Shroff
2025-04-21  2:39     ` Ming Lei
2025-04-22  7:04       ` Christoph Hellwig
2025-04-22  9:29         ` Ming Lei
2025-04-22 10:26           ` Nilay Shroff
2025-04-18 16:36 ` [PATCH V2 08/20] block: don't allow to switch elevator if updating nr_hw_queues is in-progress Ming Lei
2025-04-19 11:22   ` Nilay Shroff
2025-04-18 16:36 ` [PATCH V2 09/20] block: simplify elevator rebuild for updating nr_hw_queues Ming Lei
2025-04-19 11:25   ` Nilay Shroff
2025-04-18 16:36 ` [PATCH V2 10/20] block: add helper of elevator_change() Ming Lei
2025-04-18 16:36 ` [PATCH V2 11/20] block: move blk_unregister_queue() & device_del() after freeze wait Ming Lei
2025-04-19 12:38   ` Nilay Shroff
2025-04-22 10:50     ` Ming Lei
2025-04-18 16:36 ` [PATCH V2 12/20] block: add `struct elv_change_ctx` for unifying elevator_change Ming Lei
2025-04-19 12:40   ` Nilay Shroff
2025-04-22  7:07   ` Christoph Hellwig
2025-04-22  8:36     ` Ming Lei
2025-04-23  7:10       ` Christoph Hellwig
2025-04-18 16:36 ` [PATCH V2 13/20] block: unifying elevator change Ming Lei
2025-04-19 13:26   ` Nilay Shroff
2025-04-24  9:02     ` Ming Lei
2025-04-18 16:36 ` [PATCH V2 14/20] block: pass elevator_queue to elv_register_queue & unregister_queue Ming Lei
2025-04-19 13:28   ` Nilay Shroff
2025-04-18 16:36 ` [PATCH V2 15/20] block: fail to show/store elevator sysfs attribute if elevator is dying Ming Lei
2025-04-19 13:45   ` Nilay Shroff
2025-04-18 16:36 ` [PATCH V2 16/20] block: move elv_register[unregister]_queue out of elevator_lock Ming Lei
2025-04-19 13:55   ` Nilay Shroff
2025-04-22 10:53     ` Ming Lei
2025-04-22 11:06       ` Nilay Shroff
2025-04-22 11:14         ` Ming Lei
2025-04-18 16:36 ` [PATCH V2 17/20] block: move debugfs/sysfs register out of freezing queue Ming Lei
2025-04-19 13:57   ` Nilay Shroff
2025-04-18 16:36 ` [PATCH V2 18/20] block: remove several ->elevator_lock Ming Lei
2025-04-19 14:17   ` Nilay Shroff
2025-04-18 16:37 ` [PATCH V2 19/20] block: move hctx cpuhp add/del out of queue freezing Ming Lei
2025-04-19 14:20   ` Nilay Shroff
2025-04-18 16:37 ` [PATCH V2 20/20] block: move wbt_enable_default() out of queue freezing from sched ->exit() Ming Lei
2025-04-19 14:39   ` Nilay Shroff
2025-04-21  7:27     ` Ming Lei
2025-04-22  6:14       ` Nilay Shroff
2025-04-22  8:13         ` Ming Lei
2025-04-22  9:27           ` Nilay Shroff
2025-04-22  9:33             ` Ming Lei

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