linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/6] block: don't acquire .sysfs_lock before removing mq & iosched kobjects
@ 2019-08-21  9:15 Ming Lei
  2019-08-21  9:15 ` [PATCH V2 1/6] block: Remove blk_mq_register_dev() Ming Lei
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Ming Lei @ 2019-08-21  9:15 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-block, Ming Lei, Christoph Hellwig, Hannes Reinecke,
	Greg KH, Mike Snitzer, Bart Van Assche

Hi,

The 1st 4 patches cleans up current uses on q->sysfs_lock.

The 5th patch adds one helper for checking if queue is registered.

The last patch splits .sysfs_lock into two locks: one is only for
sync .store/.show from sysfs, the other one is for pretecting kobjects
registering/unregistering. Meantime avoid to acquire .sysfs_lock when
removing mq & iosched kobjects, so that the reported deadlock can
be fixed.

V2:
	- remove several uses on .sysfs_lock
	- Remove blk_mq_register_dev()
	- add one helper for checking queue registered
	- split .sysfs_lock into two locks

Bart Van Assche (1):
  block: Remove blk_mq_register_dev()

Ming Lei (5):
  block: don't hold q->sysfs_lock in elevator_init_mq
  blk-mq: don't hold q->sysfs_lock in blk_mq_map_swqueue
  blk-mq: don't hold q->sysfs_lock in blk_mq_realloc_hw_ctxs()
  block: add helper for checking if queue is registered
  block: split .sysfs_lock into two locks

 block/blk-core.c       |  1 +
 block/blk-mq-sysfs.c   | 23 ++++------------
 block/blk-mq.c         | 10 -------
 block/blk-sysfs.c      | 50 +++++++++++++++++++++-------------
 block/blk-wbt.c        |  2 +-
 block/blk.h            |  2 +-
 block/elevator.c       | 62 +++++++++++++++++++++++++++++++-----------
 include/linux/blk-mq.h |  1 -
 include/linux/blkdev.h |  2 ++
 9 files changed, 88 insertions(+), 65 deletions(-)

Cc: Christoph Hellwig <hch@infradead.org>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Bart Van Assche <bvanassche@acm.org>


-- 
2.20.1


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

end of thread, other threads:[~2019-08-26  2:25 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-21  9:15 [PATCH V2 0/6] block: don't acquire .sysfs_lock before removing mq & iosched kobjects Ming Lei
2019-08-21  9:15 ` [PATCH V2 1/6] block: Remove blk_mq_register_dev() Ming Lei
2019-08-21  9:15 ` [PATCH V2 2/6] block: don't hold q->sysfs_lock in elevator_init_mq Ming Lei
2019-08-21 15:51   ` Bart Van Assche
2019-08-21  9:15 ` [PATCH V2 3/6] blk-mq: don't hold q->sysfs_lock in blk_mq_map_swqueue Ming Lei
2019-08-21 15:53   ` Bart Van Assche
2019-08-26  2:11     ` Ming Lei
2019-08-21  9:15 ` [PATCH V2 4/6] blk-mq: don't hold q->sysfs_lock in blk_mq_realloc_hw_ctxs() Ming Lei
2019-08-21 15:56   ` Bart Van Assche
2019-08-26  2:25     ` Ming Lei
2019-08-21  9:15 ` [PATCH V2 5/6] block: add helper for checking if queue is registered Ming Lei
2019-08-21 15:57   ` Bart Van Assche
2019-08-21  9:15 ` [PATCH V2 6/6] block: split .sysfs_lock into two locks Ming Lei
2019-08-21 16:18   ` Bart Van Assche
2019-08-22  1:28     ` Ming Lei
2019-08-22 19:52       ` Bart Van Assche
2019-08-23  1:08         ` Ming Lei
2019-08-23 16:36           ` Bart Van Assche
2019-08-23 16:46   ` Bart Van Assche
2019-08-23 22:49     ` Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).