All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>, Ming Lei <ming.lei@redhat.com>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: WARNING: CPU: 2 PID: 207 at drivers/nvme/host/core.c:527 nvme_setup_cmd+0x3d3
Date: Tue, 30 Jan 2018 13:49:41 -0700	[thread overview]
Message-ID: <20180130204941.GF27205@localhost.localdomain> (raw)
In-Reply-To: <d09416a0-e9c8-a921-26f4-2b9da559da90@kernel.dk>

On Tue, Jan 30, 2018 at 01:32:25PM -0700, Jens Axboe wrote:
> On 1/30/18 1:30 PM, Keith Busch wrote:
> > On Tue, Jan 30, 2018 at 08:57:49AM -0700, Jens Axboe wrote:
> >>
> >> Looking at the disassembly, 'n' is 2 and 'segments' is 0xffff.
> > 
> > Is this still a problem if you don't use an IO scheduler? With deadline,
> > I'm not finding any path to bio_attempt_discard_merge which is where the
> > nr_phys_segments is supposed to get it set to 2. Not sure how it could
> > becmoe 0xffff, though.
> 
> blk_mq_make_request() -> blk_mq_sched_bio_merge() -> __blk_mq_sched_bio_merge()
> 	-> blk_mq_attempt_merge() -> bio_attempt_discard_merge()

That's the calls only if you don't have an elevator_queue, right? With
deadline, it looks like it goes through this path (ftrace confirms):

  __blk_mq_sched_bio_merge() -> dd_bio_merge() -> blk_mq_sched_try_merge()

Which doesn't have a case for ELEVATOR_DISCARD_MERGE.

Relavant function_graph:

  46)               |                    blk_mq_make_request() {
  46)   0.133 us    |                      blk_queue_bounce();
  46)   0.370 us    |                      blk_queue_split();
  46)   0.314 us    |                      bio_integrity_prep();
  46)   0.081 us    |                      blk_attempt_plug_merge();
  46)               |                      __blk_mq_sched_bio_merge() {
  46)               |                        dd_bio_merge() {
  46)   0.792 us    |                          _raw_spin_lock();
  46)               |                          blk_mq_sched_try_merge() {

WARNING: multiple messages have this Message-ID (diff)
From: keith.busch@intel.com (Keith Busch)
Subject: WARNING: CPU: 2 PID: 207 at drivers/nvme/host/core.c:527 nvme_setup_cmd+0x3d3
Date: Tue, 30 Jan 2018 13:49:41 -0700	[thread overview]
Message-ID: <20180130204941.GF27205@localhost.localdomain> (raw)
In-Reply-To: <d09416a0-e9c8-a921-26f4-2b9da559da90@kernel.dk>

On Tue, Jan 30, 2018@01:32:25PM -0700, Jens Axboe wrote:
> On 1/30/18 1:30 PM, Keith Busch wrote:
> > On Tue, Jan 30, 2018@08:57:49AM -0700, Jens Axboe wrote:
> >>
> >> Looking at the disassembly, 'n' is 2 and 'segments' is 0xffff.
> > 
> > Is this still a problem if you don't use an IO scheduler? With deadline,
> > I'm not finding any path to bio_attempt_discard_merge which is where the
> > nr_phys_segments is supposed to get it set to 2. Not sure how it could
> > becmoe 0xffff, though.
> 
> blk_mq_make_request() -> blk_mq_sched_bio_merge() -> __blk_mq_sched_bio_merge()
> 	-> blk_mq_attempt_merge() -> bio_attempt_discard_merge()

That's the calls only if you don't have an elevator_queue, right? With
deadline, it looks like it goes through this path (ftrace confirms):

  __blk_mq_sched_bio_merge() -> dd_bio_merge() -> blk_mq_sched_try_merge()

Which doesn't have a case for ELEVATOR_DISCARD_MERGE.

Relavant function_graph:

  46)               |                    blk_mq_make_request() {
  46)   0.133 us    |                      blk_queue_bounce();
  46)   0.370 us    |                      blk_queue_split();
  46)   0.314 us    |                      bio_integrity_prep();
  46)   0.081 us    |                      blk_attempt_plug_merge();
  46)               |                      __blk_mq_sched_bio_merge() {
  46)               |                        dd_bio_merge() {
  46)   0.792 us    |                          _raw_spin_lock();
  46)               |                          blk_mq_sched_try_merge() {

  reply	other threads:[~2018-01-30 20:49 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 15:41 WARNING: CPU: 2 PID: 207 at drivers/nvme/host/core.c:527 nvme_setup_cmd+0x3d3 Jens Axboe
2018-01-30 15:41 ` Jens Axboe
2018-01-30 15:57 ` Jens Axboe
2018-01-30 15:57   ` Jens Axboe
2018-01-30 20:30   ` Keith Busch
2018-01-30 20:30     ` Keith Busch
2018-01-30 20:32     ` Jens Axboe
2018-01-30 20:32       ` Jens Axboe
2018-01-30 20:49       ` Keith Busch [this message]
2018-01-30 20:49         ` Keith Busch
2018-01-30 20:55         ` Jens Axboe
2018-01-30 20:55           ` Jens Axboe
2018-01-31  4:25   ` jianchao.wang
2018-01-31  4:25     ` jianchao.wang
2018-01-31 15:29     ` Jens Axboe
2018-01-31 15:29       ` Jens Axboe
2018-01-31 23:33       ` Keith Busch
2018-01-31 23:33         ` Keith Busch
2018-02-01  3:03         ` Jens Axboe
2018-02-01  3:03           ` Jens Axboe
2018-02-01  3:03       ` jianchao.wang
2018-02-01  3:03         ` jianchao.wang
2018-02-01  3:07         ` Jens Axboe
2018-02-01  3:07           ` Jens Axboe
2018-02-01  3:33           ` jianchao.wang
2018-02-01  3:33             ` jianchao.wang
2018-02-01  3:35             ` Jens Axboe
2018-02-01  3:35               ` Jens Axboe
2018-02-01  4:56           ` Keith Busch
2018-02-01  4:56             ` Keith Busch
2018-02-01 15:26             ` Jens Axboe
2018-02-01 15:26               ` Jens Axboe
2018-02-01 17:58               ` Jens Axboe
2018-02-01 17:58                 ` Jens Axboe
2018-02-01 18:12                 ` Keith Busch
2018-02-01 18:12                   ` Keith Busch
2018-02-01 19:52                 ` Keith Busch
2018-02-01 19:52                   ` Keith Busch
2018-02-01 20:55                   ` Jens Axboe
2018-02-01 20:55                     ` Jens Axboe
2018-02-01 18:01               ` Keith Busch
2018-02-01 18:01                 ` Keith Busch

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=20180130204941.GF27205@localhost.localdomain \
    --to=keith.busch@intel.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=ming.lei@redhat.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.