From: Mike Snitzer <snitzer@redhat.com>
To: Jens Axboe <axboe@fb.com>
Cc: Hannes Reinecke <hare@suse.de>,
emilne@redhat.com, Christoph Hellwig <hch@infradead.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Mark Salter <msalter@redhat.com>,
"James E. J. Bottomley" <JBottomley@odin.com>,
brking <brking@us.ibm.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-block@vger.kernel.org,
"Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
Subject: Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!
Date: Wed, 25 Nov 2015 16:20:26 -0500 [thread overview]
Message-ID: <20151125212026.GA19936@redhat.com> (raw)
In-Reply-To: <20151125202317.GA19657@redhat.com>
On Wed, Nov 25 2015 at 3:23pm -0500,
Mike Snitzer <snitzer@redhat.com> wrote:
> On Wed, Nov 25 2015 at 2:24pm -0500,
> Jens Axboe <axboe@fb.com> wrote:
>
> > On 11/25/2015 12:10 PM, Hannes Reinecke wrote:
> > >The problem is that NOMERGE does too much, as it inhibits _any_ merging.
> >
> > Right, that is the point of the flag from the block layer view,
> > where it was originally added for the case mentioned.
>
> And we really don't want _any_ merging. The merging, if any, will have
> already happened in upper DM-multipath's elevator. So there should be
> no need to have the underlying SCSI paths do any merging.
>
> > >Unfortunately, the req->nr_phys_segments value is evaluated in the final
> > >_driver_ context _after_ the merging happend; cf
> > >scsi_lib.c:scsi_init_sgtable().
> > >As nr_phys_segments is inherited from the original request (and never
> > >recalculated with the new request queue limits) the following
> > >blk_rq_map_sg() call might end up at a different calculation, especially
> > >after retrying a request on another path.
> >
> > That all sounds pretty horrible. Why is blk_rq_check_limits()
> > checking for mergeable at all? If merging is disabled on the
> > request, I'm assuming that's an attempt at an optimization since we
> > know it won't change. But that should be tracked separately, like
> > how it's done on the bio.
>
> Not clear to me why it was checking for merging...
Ewan pointed out that blk_rq_check_limits()'s call to rq_mergable() was
introduced as part of Martin's DISCARD cleanup that prepared for
WRITE_SAME, see: commit e2a60da74 ("block: Clean up special command handling logic")
And prior to that, blk_rq_check_limits()'s (rq->cmd_flags & REQ_DISCARD)
check was introduced by some guy crazy doppelganger name "Ike Snitzer",
see commit: 3383977f ("block: update request stacking methods to support discards")
So basically we probably never needed the extra check in
blk_rq_check_limits() to begin with.. Ike was probably paranoid. ;)
next prev parent reply other threads:[~2015-11-25 21:20 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 9:18 kernel BUG at drivers/scsi/scsi_lib.c:1096! Michael Ellerman
2015-11-18 11:06 ` Laurent Dufour
2015-11-18 11:10 ` Michael Ellerman
2015-11-18 11:17 ` Laurent Dufour
2015-11-18 14:03 ` Mark Salter
2015-11-19 1:02 ` Michael Ellerman
2015-11-19 8:23 ` Christoph Hellwig
2015-11-19 15:35 ` Hannes Reinecke
2015-11-20 14:38 ` Ewan Milne
2015-11-20 14:55 ` Hannes Reinecke
2015-11-20 15:28 ` Ewan Milne
2015-11-23 6:55 ` Hannes Reinecke
2015-11-25 9:04 ` Hannes Reinecke
2015-11-25 17:56 ` Jens Axboe
2015-11-25 19:10 ` Hannes Reinecke
2015-11-25 19:24 ` Jens Axboe
2015-11-25 20:23 ` Mike Snitzer
2015-11-25 21:20 ` Mike Snitzer [this message]
2015-11-25 18:01 ` Mike Snitzer
2015-11-25 19:01 ` Hannes Reinecke
2015-12-04 16:59 ` Takashi Iwai
2015-12-04 17:02 ` Jens Axboe
2015-12-04 17:09 ` Takashi Iwai
2015-11-20 12:10 ` Michael Ellerman
2015-11-20 12:56 ` Laurent Dufour
2015-11-20 13:37 ` Mark Salter
2015-11-21 11:30 ` Laurent Dufour
2015-11-21 16:56 ` Ming Lei
2015-11-22 23:20 ` Mark Salter
2015-11-23 0:36 ` Ming Lei
2015-11-23 1:50 ` Mark Salter
2015-11-23 2:46 ` Ming Lei
2015-11-23 15:21 ` Ming Lei
2015-11-24 18:59 ` Alan Ott
2015-11-23 13:57 ` Laurent Dufour
2015-11-23 15:13 ` Pratyush Anand
2015-11-23 15:20 ` Laurent Dufour
2015-11-23 15:27 ` Ming Lei
2015-11-23 16:24 ` Laurent Dufour
2015-11-24 1:30 ` Mark Salter
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=20151125212026.GA19936@redhat.com \
--to=snitzer@redhat.com \
--cc=JBottomley@odin.com \
--cc=axboe@fb.com \
--cc=brking@us.ibm.com \
--cc=emilne@redhat.com \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=j-nomura@ce.jp.nec.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=msalter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).