From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Andy Grover <agrover@redhat.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
linux-block@vger.kernel.org,
linux-scsi <linux-scsi@vger.kernel.org>,
target-devel <target-devel@vger.kernel.org>
Subject: Re: Should queue_max_hw_sectors() always be <= max_dev_sectors?
Date: Tue, 30 Aug 2016 22:15:05 -0400 [thread overview]
Message-ID: <yq1y43d7kgm.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <202d350b-0e59-1a10-4b65-3563f0afa084@redhat.com> (Andy Grover's message of "Tue, 30 Aug 2016 09:54:05 -0700")
>>>>> "Andy" == Andy Grover <agrover@redhat.com> writes:
Hey Andy,
Andy> ...because limits.max_hw_sectors internally seems to be just the
Andy> controller limit, but what users of queue_max_hw_sectors
Andy> (including sysfs) really want is the lesser of
Andy> limits.max_hw_sectors and limits.max_dev_sectors.
max_dev_sectors is a limit reported by the target device for
READ/WRITE/VERIFY requests. Whereas max_hw_sectors describes the DMA
constraints of the controller.
It is a requirement for SG_IO, firmware updates, tape drives, etc. that
the controller limits are reported correctly since they do I/Os that are
much bigger than typical filesystem requests. When we tried to conflate
the two things broke in interesting ways.
I can't remember why the max_dev_sectors sysfs export patch didn't go
in. But instead (or in addition) we could entertain having a
max_rw_sectors_kb file that reflects the biggest READ/WRITE/VERIFY
request the device can consume if that's the information you're after?
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2016-08-31 2:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 16:54 Should queue_max_hw_sectors() always be <= max_dev_sectors? Andy Grover
2016-08-31 2:11 ` Jens Axboe
2016-08-31 2:15 ` Martin K. Petersen [this message]
2016-08-31 2:36 ` Jens Axboe
2016-08-31 4:11 ` Martin K. Petersen
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=yq1y43d7kgm.fsf@sermon.lab.mkp.net \
--to=martin.petersen@oracle.com \
--cc=agrover@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=target-devel@vger.kernel.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