From: Jens Axboe <jens.axboe@oracle.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Boaz Harrosh <bharrosh@panasas.com>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] remove use_sg_chaining
Date: Sun, 20 Jan 2008 20:29:42 +0100 [thread overview]
Message-ID: <20080120192942.GW6258@kernel.dk> (raw)
In-Reply-To: <1200857062.3105.15.camel@localhost.localdomain>
On Sun, Jan 20 2008, James Bottomley wrote:
>
> On Sun, 2008-01-20 at 21:18 +0200, Boaz Harrosh wrote:
> > On Tue, Jan 15 2008 at 19:52 +0200, James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
> > > this patch depends on the sg branch of the block tree
> > >
> > > James
> > >
> > > ---
> > > From: James Bottomley <James.Bottomley@HansenPartnership.com>
> > > Date: Tue, 15 Jan 2008 11:11:46 -0600
> > > Subject: remove use_sg_chaining
> > >
> > > With the sg table code, every SCSI driver is now either chain capable
> > > or broken, so there's no need to have a check in the host template.
> > >
> > > Also tidy up the code by moving the scatterlist size defines into the
> > > SCSI includes and permit the last entry of the scatterlist pools not
> > > to be a power of two.
> > > ---
> >
> > I have a theoretical problem that BUGed me from the beginning.
> >
> > Could it happen that a memory critical IO, (that is needed to free
> > memory), be collected into an sg-chained large IO, and the allocation
> > of the multiple sg-pool-allocations fail, thous dead locking on
> > out-of-memory? Is there a mechanism in place that will split large IO's
> > into smaller chunks in the event of out-of-memory condition in prep_fn?
> >
> > Is it possible to call blk_rq_map_sg() with less then what is present
> > at request to only map the starting portion?
>
> Obviously, that's why I was worrying about mempool size and default
> blocks a while ago.
>
> However, the deadlock only occurs if the device is swap or backing a
> filesystem with memory mapped files. The use cases for this are really
> tapes and other entities that need huge buffers. That's why we're
> keeping the system sector size at 1024 unless you alter it through sysfs
> (here gun, there foot ...)
Alternatively (and much safer, imho), we allow blk_rq_map_sg() return
smaller than nr_phys_segments and just ensure that the request is
continued nicely through the normal 'request if residual' logic.
--
Jens Axboe
next prev parent reply other threads:[~2008-01-20 19:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-15 17:52 [PATCH] remove use_sg_chaining James Bottomley
2008-01-15 20:10 ` [PATCH] firewire: fw-sbp2: prepare for s/g chaining Stefan Richter
2008-01-15 20:11 ` [PATCH] ieee1394: sbp2: " Stefan Richter
2008-01-15 20:21 ` Stefan Richter
2008-01-18 3:33 ` [PATCH] firewire: fw-sbp2: " FUJITA Tomonori
2008-01-19 21:20 ` Stefan Richter
2008-01-20 19:18 ` [PATCH] remove use_sg_chaining Boaz Harrosh
2008-01-20 19:24 ` James Bottomley
2008-01-20 19:29 ` Jens Axboe [this message]
2008-01-20 19:56 ` Boaz Harrosh
2008-01-20 19:59 ` Jens Axboe
2008-01-20 20:01 ` Jens Axboe
2008-01-20 20:59 ` James Bottomley
2008-01-21 8:32 ` Boaz Harrosh
2008-01-21 9:31 ` Jens Axboe
2008-01-21 10:31 ` Boaz Harrosh
2008-01-21 11:32 ` Benny Halevy
2008-01-20 19:54 ` Boaz Harrosh
2008-01-20 19:59 ` Jens Axboe
2008-01-20 20:52 ` James Bottomley
2008-01-21 4:33 ` FUJITA Tomonori
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=20080120192942.GW6258@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bharrosh@panasas.com \
--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;
as well as URLs for NNTP newsgroup(s).