From: jianchao.w.wang@oracle.com (jianchao.wang)
Subject: [PATCH 2/6] nvme-pci: fix the freeze and quiesce for shutdown and reset case
Date: Mon, 5 Feb 2018 10:26:03 +0800 [thread overview]
Message-ID: <d93d115b-bdb1-24c0-71be-72f1b7563e5a@oracle.com> (raw)
In-Reply-To: <20180202182413.GH24417@localhost.localdomain>
Hi Keith
Thanks for your kindly response.
On 02/03/2018 02:24 AM, Keith Busch wrote:
> On Fri, Feb 02, 2018@03:00:45PM +0800, Jianchao Wang wrote:
>> Currently, request queue will be frozen and quiesced for both reset
>> and shutdown case. This will trigger ioq requests in RECONNECTING
>> state which should be avoided to prepare for following patch.
>> Just freeze request queue for shutdown case and drain all the resudual
>> entered requests after controller has been shutdown.
> Freezing is not just for shutdown. It's also used so
> blk_mq_update_nr_hw_queues will work if the queue count changes across
> resets.
blk_mq_update_nr_hw_queues will freeze the queue itself. Please refer to.
static void __blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set,
int nr_hw_queues)
{
struct request_queue *q;
lockdep_assert_held(&set->tag_list_lock);
if (nr_hw_queues > nr_cpu_ids)
nr_hw_queues = nr_cpu_ids;
if (nr_hw_queues < 1 || nr_hw_queues == set->nr_hw_queues)
return;
list_for_each_entry(q, &set->tag_list, tag_set_list)
blk_mq_freeze_queue(q);
set->nr_hw_queues = nr_hw_queues;
blk_mq_update_queue_map(set);
list_for_each_entry(q, &set->tag_list, tag_set_list) {
blk_mq_realloc_hw_ctxs(set, q);
blk_mq_queue_reinit(q);
}
list_for_each_entry(q, &set->tag_list, tag_set_list)
blk_mq_unfreeze_queue(q);
}
Thanks
Jianchao
next prev parent reply other threads:[~2018-02-05 2:26 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 7:00 [PATCH 0/6]nvme-pci: fixes on nvme_timeout and nvme_dev_disable Jianchao Wang
2018-02-02 7:00 ` [PATCH 1/6] nvme-pci: move clearing host mem behind stopping queues Jianchao Wang
2018-02-02 18:46 ` Keith Busch
2018-02-05 2:30 ` jianchao.wang
2018-02-02 7:00 ` [PATCH 2/6] nvme-pci: fix the freeze and quiesce for shutdown and reset case Jianchao Wang
2018-02-02 18:24 ` Keith Busch
2018-02-05 2:26 ` jianchao.wang [this message]
2018-02-05 15:13 ` Keith Busch
2018-02-06 1:46 ` jianchao.wang
2018-02-06 15:13 ` Keith Busch
2018-02-07 2:03 ` jianchao.wang
2018-02-07 2:13 ` jianchao.wang
2018-02-07 16:13 ` Keith Busch
2018-02-08 1:40 ` jianchao.wang
2018-02-08 14:17 ` jianchao.wang
2018-02-08 15:15 ` Keith Busch
2018-02-09 1:41 ` jianchao.wang
2018-02-02 7:00 ` [PATCH 3/6] blk-mq: make blk_mq_rq_update_aborted_gstate a external interface Jianchao Wang
2018-02-02 7:00 ` [PATCH 4/6] nvme-pci: break up nvme_timeout and nvme_dev_disable Jianchao Wang
2018-02-02 18:31 ` Keith Busch
2018-02-05 2:22 ` jianchao.wang
2018-02-02 7:00 ` [PATCH 5/6] nvme-pci: discard wait timeout when delete cq/sq Jianchao Wang
2018-02-02 7:00 ` [PATCH 6/6] nvme-pci: suspend queues based on online_queues Jianchao Wang
-- strict thread matches above, loose matches on Subject: below --
2018-02-02 6:54 No subject Jianchao Wang
2018-02-02 6:54 ` [PATCH 2/6] nvme-pci: fix the freeze and quiesce for shutdown and reset case Jianchao Wang
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=d93d115b-bdb1-24c0-71be-72f1b7563e5a@oracle.com \
--to=jianchao.w.wang@oracle.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