From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Jens Axboe <Jens.Axboe@oracle.com>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: Actually using the sg table/chain code
Date: Tue, 15 Jan 2008 14:14:44 -0600 [thread overview]
Message-ID: <1200428084.9273.55.camel@localhost.localdomain> (raw)
In-Reply-To: <478D0EE0.4070208@garzik.org>
On Tue, 2008-01-15 at 14:52 -0500, Jeff Garzik wrote:
> James Bottomley wrote:
> > if (BLK_DEF_MAX_SECTORS > max_sectors)
> > q->max_hw_sectors = q->max_sectors = max_sectors;
> > else {
> > q->max_sectors = BLK_DEF_MAX_SECTORS;
> > q->max_hw_sectors = max_sectors;
> > }
> > }
> >
> > So it imposes a maximum possible setting of BLK_DEF_MAX_SECTORS which is
> > defined in blkdev.h to .... 1024, thus also forcing the queue down to
> > 128 scatterlist entries.
> >
> > Once I raised this limit as well, I was able to transfer over 128
> > scatterlist elements during benchmark test runs of normal I/O (actually
> > kernel compiles seem best, they hit 608 scatterlist entries).
> >
> > So my question, is there any reason not to raise this limit to something
> > large (like 65536) or even eliminate it altogether?
>
> ISTR a thread long ago, perhaps including Andrea A (as well as Jens),
> where 1024 sectors was arrived upon as a reasonable balance between
> tying up gobs of VM memory on a single command (multiplied, then, across
> N commands), and getting decent per-command throughput.
>
> Jens probably recalls better than I... but I'm pretty sure that the
> 1024 limit played into "being nice with the VM" somehow.
There's certainly the writeout deadlock avoidance issue. 1024 sectors
is 128 scatterlist entries (at minimum physical merging), is currently
the maximum SCSI scatterlist from the mempools, so would always have a
logically provable forward progress clear path. Once we go over this,
we start to get into corner cases where we have to hope that having deep
enough mempools makes the issue magically disappear.
The question is, how should we police all of this? Should be block
layer really be blindly enforcing the 1024 sector limit ... particularly
now the default allocator won't begin chaining until we get 2048 sectors
or higher?
James
next prev parent reply other threads:[~2008-01-15 20:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-15 15:52 Actually using the sg table/chain code James Bottomley
2008-01-15 16:09 ` Boaz Harrosh
2008-01-15 16:49 ` James Bottomley
2008-01-15 17:35 ` Boaz Harrosh
2008-01-16 14:01 ` Boaz Harrosh
2008-01-16 15:09 ` James Bottomley
2008-01-16 16:11 ` Boaz Harrosh
2008-01-16 16:37 ` Boaz Harrosh
2008-01-16 16:46 ` James Bottomley
2008-01-15 19:52 ` Jeff Garzik
2008-01-15 20:14 ` James Bottomley [this message]
2008-01-16 15:06 ` Jens Axboe
2008-01-16 15:47 ` James Bottomley
2008-01-16 16:08 ` Jens Axboe
2008-02-22 16:13 ` Mike Christie
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=1200428084.9273.55.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=Jens.Axboe@oracle.com \
--cc=jeff@garzik.org \
--cc=linux-scsi@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