All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/7] blk-mq: fix race conditions on cpu hotplug handling
@ 2015-09-26 17:09 Akinobu Mita
  2015-09-26 17:09 ` [PATCH v4 1/7] blk-mq: avoid setting hctx->tags->cpumask before allocation Akinobu Mita
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: Akinobu Mita @ 2015-09-26 17:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: Akinobu Mita, Jens Axboe, Ming Lei, Tejun Heo, Keith Busch,
	Christoph Hellwig, Wanpeng Li

This patchset addresses several race conditions on cpu hotplug handling
for blk-mq.  All problems can be reproducible by the following script.

while true; do
	echo 0 > /sys/devices/system/cpu/cpu1/online
	echo 1 > /sys/devices/system/cpu/cpu1/online
done &

while true; do
	modprobe -r null_blk
	modprobe null_blk queue_mode=2 irqmode=1
	sleep 0.1
done

* Changes from v3
- Rebased to the latest kernel
- Add Reviewed-by tags

* Changes from v2
- Add regression fix for hctx->tags->cpumask
- Remove BLK_MQ_F_SYSFS_UP per-hctx flag and use mq_sysfs_init_done
  per-queue flag instead with appropriate locking in order to keep
  track of 'mq' sysfs entry's life
- Add comments on non-trivial stuffs, suggested by Ming

* Changes from v1
- Release q->mq_map in blk_mq_release()
- Fix deadlock when reading cpu_list
- Fix race freeze and unfreeze

Akinobu Mita (7):
  blk-mq: avoid setting hctx->tags->cpumask before allocation
  blk-mq: fix sysfs registration/unregistration race
  blk-mq: Fix use after of free q->mq_map
  blk-mq: fix q->mq_usage_counter access race
  blk-mq: avoid inserting requests before establishing new mapping
  blk-mq: fix freeze queue race
  blk-mq: fix deadlock when reading cpu_list

 block/blk-core.c       |   1 +
 block/blk-mq-cpumap.c  |   9 +++--
 block/blk-mq-sysfs.c   |  36 ++++++++++++------
 block/blk-mq.c         | 100 +++++++++++++++++++++++++++++++++++++------------
 block/blk-mq.h         |   3 +-
 include/linux/blk-mq.h |   1 -
 include/linux/blkdev.h |   8 ++++
 7 files changed, 116 insertions(+), 42 deletions(-)

Cc: Jens Axboe <axboe@kernel.dk>
Cc: Ming Lei <tom.leiming@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Wanpeng Li <wanpeng.li@hotmail.com>
-- 
1.9.1


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

end of thread, other threads:[~2015-10-06  9:43 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-26 17:09 [PATCH v4 0/7] blk-mq: fix race conditions on cpu hotplug handling Akinobu Mita
2015-09-26 17:09 ` [PATCH v4 1/7] blk-mq: avoid setting hctx->tags->cpumask before allocation Akinobu Mita
2015-09-26 18:12   ` Christoph Hellwig
2015-09-26 17:09 ` [PATCH v4 2/7] blk-mq: fix sysfs registration/unregistration race Akinobu Mita
2015-09-29  6:51   ` Christoph Hellwig
2015-09-26 17:09 ` [PATCH v4 3/7] blk-mq: Fix use after of free q->mq_map Akinobu Mita
2015-09-29  6:52   ` Christoph Hellwig
2015-10-05 23:50     ` Akinobu Mita
2015-10-06  9:43       ` Christoph Hellwig
2015-09-26 17:09 ` [PATCH v4 4/7] blk-mq: fix q->mq_usage_counter access race Akinobu Mita
2015-09-29  6:53   ` Christoph Hellwig
2015-09-26 17:09 ` [PATCH v4 5/7] blk-mq: avoid inserting requests before establishing new mapping Akinobu Mita
2015-09-29  6:54   ` Christoph Hellwig
2015-09-26 17:09 ` [PATCH v4 6/7] blk-mq: fix freeze queue race Akinobu Mita
2015-09-26 17:32   ` Tejun Heo
2015-09-27 13:06     ` Akinobu Mita
2015-09-28 14:48       ` Tejun Heo
2015-09-29  6:55         ` Christoph Hellwig
2015-09-29 15:01         ` Jens Axboe
2015-09-29 15:03           ` Tejun Heo
2015-09-29 21:50             ` Tejun Heo
2015-09-30 10:32               ` Akinobu Mita
2015-09-26 17:09 ` [PATCH v4 7/7] blk-mq: fix deadlock when reading cpu_list Akinobu Mita
2015-09-29  6:58   ` Christoph Hellwig
2015-09-29 17:31 ` [PATCH v4 0/7] blk-mq: fix race conditions on cpu hotplug handling Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.