From: Keith Busch <keith.busch@intel.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jens Axboe <axboe@fb.com>,
Stefan Haberland <sth@linux.vnet.ibm.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-s390 <linux-s390@vger.kernel.org>,
Sebastian Ott <sebott@linux.vnet.ibm.com>
Subject: Re: [BUG] Regression introduced with "block: split bios to max possible length"
Date: Fri, 22 Jan 2016 03:21:36 +0000 [thread overview]
Message-ID: <20160122032135.GA9244@localhost.localdomain> (raw)
In-Reply-To: <CA+55aFxbYLEj=aQtEu3X92m44dbREssAQeSG8ZfoLT_WL5_fkQ@mail.gmail.com>
On Thu, Jan 21, 2016 at 05:12:13PM -0800, Linus Torvalds wrote:
> On Thu, Jan 21, 2016 at 2:51 PM, Keith Busch <keith.busch@intel.com> wrote:
> >
> > My apologies for the trouble. I trust it really is broken, but I don't
> > quite see how. The patch supposedly splits the transfer to the max size
> > the request queue says it allows. How does the max allowed size end up
> > an invalid multiple?
>
> I assume that in this case it's simply that
>
> - max_sectors is some odd number in sectors (ie 65535)
>
> - the block size is larger than a sector (ie 4k)
Wouldn't that make max sectors non-sensical? Or am I mistaken to think max
sectors is supposed to be a valid transfer in multiples of the physical
sector size?
I do think this is what's happening though. A recent commit (ca369d51b)
limits the max_sectors to 255 max by default, which isn't right for
4k. A driver has to override the queue's limits.max_dev_sectors first
to get the desired limit for their storage.
I'm not sure if that was the intention. There are lots of drivers
requesting more than 255 and probably unaware they're not getting it,
DASD included. I don't think we'd have seen this problem if the requested
setting wasn't overridden.
> What I think it _should_ do is:
>
> (a) check against max sectors like it used to do:
>
> if (sectors + (bv.bv_len >> 9) > queue_max_sectors(q))
> goto split;
This can create less optimal splits for h/w that advertise chunk size. I
know it's a quirky feature (wasn't my idea), but the h/w is very slow
to not split at the necessary alignments, and we used to handle this
split correctly.
Point taken, though. The implementation needs some cleaning up.
next prev parent reply other threads:[~2016-01-22 3:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 14:57 [BUG] Regression introduced with "block: split bios to max possible length" Stefan Haberland
2016-01-21 21:34 ` Jens Axboe
2016-01-21 22:51 ` Keith Busch
2016-01-22 1:12 ` Linus Torvalds
2016-01-22 3:21 ` Keith Busch [this message]
2016-01-22 4:15 ` Linus Torvalds
2016-01-22 14:56 ` Keith Busch
2016-01-22 17:15 ` Jens Axboe
2016-01-22 15:06 ` Ming Lei
2016-01-22 17:03 ` Linus Torvalds
2016-01-22 17:48 ` Ming Lei
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=20160122032135.GA9244@localhost.localdomain \
--to=keith.busch@intel.com \
--cc=axboe@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=sebott@linux.vnet.ibm.com \
--cc=sth@linux.vnet.ibm.com \
--cc=torvalds@linux-foundation.org \
/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