All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "ming.lei@redhat.com" <ming.lei@redhat.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>
Cc: "hch@infradead.org" <hch@infradead.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"osandov@fb.com" <osandov@fb.com>
Subject: Re: [PATCH 0/4] blk-mq: support to use hw tag for scheduling
Date: Wed, 3 May 2017 17:08:30 +0000	[thread overview]
Message-ID: <1493831309.3901.17.camel@sandisk.com> (raw)
In-Reply-To: <20170503165201.GB9706@ming.t460p>

On Thu, 2017-05-04 at 00:52 +0800, Ming Lei wrote:
> Looks v4.11 plus your for-linus often triggers the following hang during
> boot, and it seems caused by the change in (blk-mq: unify hctx delayed_ru=
n_work
> and run_work)
>=20
>=20
> BUG: scheduling while atomic: kworker/0:1H/704/0x00000002
> Modules linked in:
> Preemption disabled at:
> [<ffffffffaf5607bb>] virtio_queue_rq+0xdb/0x350
> CPU: 0 PID: 704 Comm: kworker/0:1H Not tainted 4.11.0-04508-ga1f35f46164b=
 #132
> Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.9.3-1.fc25 04/=
01/2014
> Workqueue: kblockd blk_mq_run_work_fn
> Call Trace:
>  dump_stack+0x65/0x8f
>  ? virtio_queue_rq+0xdb/0x350
>  __schedule_bug+0x76/0xc0
>  __schedule+0x610/0x820
>  ? new_slab+0x2c9/0x590
>  schedule+0x40/0x90
>  schedule_timeout+0x273/0x320
>  ? ___slab_alloc+0x3cb/0x4f0
>  wait_for_completion+0x97/0x100
>  ? wait_for_completion+0x97/0x100
>  ? wake_up_q+0x80/0x80
>  flush_work+0x104/0x1a0
>  ? flush_workqueue_prep_pwqs+0x130/0x130
>  __cancel_work_timer+0xeb/0x160
>  ? vp_notify+0x16/0x20
>  ? virtqueue_add_sgs+0x23c/0x4a0
>  cancel_delayed_work_sync+0x13/0x20
>  blk_mq_stop_hw_queue+0x16/0x20
>  virtio_queue_rq+0x316/0x350
>  blk_mq_dispatch_rq_list+0x194/0x350
>  blk_mq_sched_dispatch_requests+0x118/0x170
>  ? finish_task_switch+0x80/0x1e0
>  __blk_mq_run_hw_queue+0xa3/0xc0
>  blk_mq_run_work_fn+0x2c/0x30
>  process_one_work+0x1e0/0x400
>  worker_thread+0x48/0x3f0
>  kthread+0x109/0x140
>  ? process_one_work+0x400/0x400
>  ? kthread_create_on_node+0x40/0x40
>  ret_from_fork+0x2c/0x40

Callers of blk_mq_quiesce_queue() really need blk_mq_stop_hw_queue() to
cancel delayed work synchronously. The above call stack shows that we have
to do something about the blk_mq_stop_hw_queue() calls from inside .queue_r=
q()
functions for queues for which BLK_MQ_F_BLOCKING has not been set. I'm not
sure what the best approach would be: setting BLK_MQ_F_BLOCKING for queues
that call blk_mq_stop_hw_queue() from inside .queue_rq() or creating two
versions of blk_mq_stop_hw_queue().

Bart.=

  parent reply	other threads:[~2017-05-03 17:08 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-28 15:15 [PATCH 0/4] blk-mq: support to use hw tag for scheduling Ming Lei
2017-04-28 15:15 ` [PATCH 1/4] blk-mq: introduce BLK_MQ_F_SCHED_USE_HW_TAG Ming Lei
2017-05-03 16:21   ` Omar Sandoval
2017-05-03 16:46   ` Omar Sandoval
2017-05-03 20:13     ` Ming Lei
2017-05-03 21:40       ` Omar Sandoval
2017-05-04  2:01         ` Ming Lei
2017-05-04  2:13           ` Jens Axboe
2017-05-04  2:51             ` Ming Lei
2017-05-04 14:06               ` Jens Axboe
2017-05-05 22:54                 ` Ming Lei
2017-05-05 22:54                   ` Ming Lei
2017-05-05 23:33                   ` Ming Lei
2017-05-05 23:33                     ` Ming Lei
2017-05-10  7:25                 ` Ming Lei
2017-04-28 15:15 ` [PATCH 2/4] blk-mq: introduce blk_mq_get_queue_depth() Ming Lei
2017-04-28 18:23   ` Jens Axboe
2017-04-29  9:55     ` Ming Lei
2017-05-03 16:55   ` Omar Sandoval
2017-05-04  2:10     ` Ming Lei
2017-04-28 15:15 ` [PATCH 3/4] blk-mq: use hw tag for scheduling if hw tag space is big enough Ming Lei
2017-04-28 18:09   ` Bart Van Assche
2017-04-29 10:35     ` Ming Lei
2017-05-01 15:06       ` Bart Van Assche
2017-05-02  3:49         ` Omar Sandoval
2017-05-02  8:46         ` Ming Lei
2017-04-28 18:22   ` Jens Axboe
2017-04-28 20:11     ` Bart Van Assche
2017-04-29 10:59     ` Ming Lei
2017-05-03 16:29   ` Omar Sandoval
2017-05-03 16:55     ` Ming Lei
2017-05-03 17:00       ` Omar Sandoval
2017-05-03 17:33         ` Ming Lei
2017-04-28 15:15 ` [PATCH 4/4] blk-mq: dump new introduced flag of BLK_MQ_F_SCHED_USE_HW_TAG Ming Lei
2017-04-28 18:10   ` Bart Van Assche
2017-04-29 11:00     ` Ming Lei
2017-04-28 20:29 ` [PATCH 0/4] blk-mq: support to use hw tag for scheduling Jens Axboe
2017-05-03  4:03   ` Ming Lei
2017-05-03 14:08     ` Jens Axboe
2017-05-03 14:10       ` Jens Axboe
2017-05-03 15:03         ` Ming Lei
2017-05-03 15:08           ` Jens Axboe
2017-05-03 15:38             ` Ming Lei
2017-05-03 16:06               ` Omar Sandoval
2017-05-03 16:21                 ` Ming Lei
2017-05-03 16:52               ` Ming Lei
2017-05-03 17:03                 ` Ming Lei
2017-05-03 17:07                   ` Jens Axboe
2017-05-03 17:15                     ` Bart Van Assche
2017-05-03 17:24                       ` Jens Axboe
2017-05-03 17:35                         ` Bart Van Assche
2017-05-03 17:40                           ` Jens Axboe
2017-05-03 17:43                             ` Bart Van Assche
2017-05-03 17:08                 ` Bart Van Assche [this message]
2017-05-03 17:11                   ` Jens Axboe
2017-05-03 17:19                   ` Ming Lei
2017-05-03 17:41                     ` Bart Van Assche

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=1493831309.3901.17.camel@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=osandov@fb.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 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.