From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
Jens Axboe <axboe@kernel.dk>, Ming Lei <tom.leiming@gmail.com>,
Tejun Heo <tj@kernel.org>, Keith Busch <keith.busch@intel.com>
Subject: [PATCH v3 0/7] blk-mq: fix race conditions on cpu hotplug handling
Date: Sun, 19 Jul 2015 01:28:16 +0900 [thread overview]
Message-ID: <1437236903-31617-1-git-send-email-akinobu.mita@gmail.com> (raw)
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 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 access 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>
--
1.9.1
next reply other threads:[~2015-07-18 16:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-18 16:28 Akinobu Mita [this message]
2015-07-18 16:28 ` [PATCH v3 1/7] blk-mq: avoid access hctx->tags->cpumask before allocation Akinobu Mita
2015-07-19 10:24 ` Ming Lei
2015-07-21 13:58 ` Akinobu Mita
2015-07-27 9:49 ` Ming Lei
2015-07-18 16:28 ` [PATCH v3 2/7] blk-mq: fix sysfs registration/unregistration race Akinobu Mita
2015-07-19 11:47 ` Ming Lei
2015-07-18 16:28 ` [PATCH v3 3/7] blk-mq: Fix use after of free q->mq_map Akinobu Mita
2015-07-18 16:28 ` [PATCH v3 4/7] blk-mq: fix q->mq_usage_counter access race Akinobu Mita
2015-07-18 16:28 ` [PATCH v3 5/7] blk-mq: avoid inserting requests before establishing new mapping Akinobu Mita
2015-07-19 12:12 ` Ming Lei
2015-07-18 16:28 ` [PATCH v3 6/7] blk-mq: fix freeze queue race Akinobu Mita
2015-07-19 12:12 ` Ming Lei
2015-07-18 16:28 ` [PATCH v3 7/7] blk-mq: fix deadlock when reading cpu_list Akinobu Mita
2015-07-19 12:30 ` Ming Lei
2015-07-28 8:10 ` Wanpeng Li
2015-07-28 23:37 ` Akinobu Mita
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1437236903-31617-1-git-send-email-akinobu.mita@gmail.com \
--to=akinobu.mita@gmail.com \
--cc=axboe@kernel.dk \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=tom.leiming@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®