public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [BIO] Bounce queue in bio_add_page
Date: Mon, 3 Nov 2003 13:25:00 +0100	[thread overview]
Message-ID: <20031103122500.GA6963@suse.de> (raw)
In-Reply-To: <20031101100543.GA16682@gondor.apana.org.au>

On Sat, Nov 01 2003, Herbert Xu wrote:
> On Sat, Nov 01, 2003 at 03:46:19PM +1100, herbert wrote:
> > 
> > Currently bio_add_page will allow segments to be counted as merged
> > before they've been bounced.  This can create bio's that exceed
> > limits set by the driver/hardware.  This bug can be triggered on
> > HIGHMEM machines as well as ISA block devices such as AHA1542.
> > 
> > Here is a hack that works around it by bouncing the queue before
> > recounting the segments.
> 
> That patch chained bio's together which is prone to deadlock.  I've
> modified __blk_queue_bounce to only allocate a new bio if it hasn't
> been bounced already.  Unfortunately it has to allocate one with the
> maximum number of bvecs so it's even more of a hack.
> 
> Hopefully someone else can come up with a better fix.

I think the best fix would be to simply not allow more than one page
that needs to be bounced to a bio. The problem is that the whole bio and
bio_vec allocations needs to be duplicated for highmem bouncing, and
that really doesn't thrill me. So a single mempool for bio, and single
entry bio_vec would be a lot leaner. I'll see if I can squeeze out a
prototype today.

I totally agree with your analysis of the problem, though.

-- 
Jens Axboe


  reply	other threads:[~2003-11-03 12:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-01  4:46 [BIO] Bounce queue in bio_add_page Herbert Xu
2003-11-01 10:05 ` Herbert Xu
2003-11-03 12:25   ` Jens Axboe [this message]
2003-11-03 20:52     ` Herbert Xu
2003-11-04  8:49       ` Jens Axboe
2003-11-04  9:03         ` Herbert Xu
2003-11-04  9:03           ` Jens Axboe
2003-11-05  9:48             ` Jens Axboe
2003-11-06 21:09               ` Herbert Xu
2003-11-07 11:23                 ` Herbert Xu
2003-11-07 11:25                   ` Jens Axboe
2003-11-07 11:28                     ` Herbert Xu
2003-11-07 11:32                       ` Jens Axboe
2003-11-07 22:52                         ` Herbert Xu
2003-11-08  9:29                           ` Jens Axboe

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=20031103122500.GA6963@suse.de \
    --to=axboe@suse.de \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@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