From: Andrew Morton <akpm@zip.com.au>
To: "Adam J. Richter" <adam@yggdrasil.com>
Cc: axboe@suse.de, linux-kernel@vger.kernel.org
Subject: Re: bio_chain: proposed solution for bio_alloc failure and large IO simplification
Date: Fri, 14 Jun 2002 16:58:54 -0700 [thread overview]
Message-ID: <3D0A833E.3C396756@zip.com.au> (raw)
In-Reply-To: <200206142339.QAA27000@adam.yggdrasil.com>
"Adam J. Richter" wrote:
>
> Andrew Morton <akpm@zip.com.au> wrote:
> >I have not yet seen a BIO allocation failure in testing. This
> >would indicate that either the BIO pool is too large, or I'm
> >running the wrong tests. Either way, I don't think we have
> >demonstrated any otherwise-unsolvable problems with BIO allocation.
>
> You need to prove that this can never happen once the
> device is initialized, not just that no 2.5 user has reported it
> yet.
BIOs for reads are allocated with GFP_KERNEL - both mpage_readpages
and mpage_readpage.
They used to be allocated GFP_NOIO. This is a subtle but significant
improvement which came in when we stopped using submit_bh for bulk reads.
It means that the only time we threaten the memory reserves is when
allocating BIOs for writes. And those BIOs free more memory than they
consume. This, plus the PF_MEMALLOC reserves which the radix-tree
allocator leaves behind makes us pretty robust.
A poorly-written gigE driver could zoom in and steal the remaining
few megabytes from interrupt context. But even then, the BIO mempools
would have to be exhausted at the time. And I don't see a way in which
they can be exhausted without us having write BIOs in flight.
No, I can't prove it. But I can't think of a contrary scenario
either.
> >What bugs me about your approach is this: I have been gradually
> >nudging the kernel's IO paths away from enormously-long per-page
> >call paths and per-page locking into the direction of a sequence
> >of short little loops, each of which does the same stuff against
> >a bunch of pages.
>
> You need to reread the last paragraph of my previous post.
> I have added some capitalization to help:
>
> >> I think I would be happy enough with your approach, but, just
> >>to eliminate possibilities of memory allocation failure, I think I
> >>want to still have some kind of bio_chain, perhaps without the merge
> >>hinting, BUT WITH A PARAMETER TO ALLOW FOR ALLOCATING A BIO UP TO THE
> >>SIZE OF OLDBIO, like so:
> >>
> >>struct bio *bio_chain(struct bio *oldbio, int gfp_mask,
> >> int nvecs /* <= oldbio->bi_max */);
>
> This would not interfere with your plans try to do things
> in n page chunks.
OK, the caps helped ;)
-
next prev parent reply other threads:[~2002-06-15 0:00 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-14 23:39 bio_chain: proposed solution for bio_alloc failure and large IO simplification Adam J. Richter
2002-06-14 23:58 ` Andrew Morton [this message]
2002-06-15 1:38 ` Oliver Xymoron
2002-06-15 7:55 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2002-06-15 20:24 Adam J. Richter
2002-06-17 6:37 ` Jens Axboe
2002-06-15 20:01 Adam J. Richter
2002-06-15 20:22 ` Andrew Morton
2002-06-15 10:30 Adam J. Richter
2002-06-15 19:50 ` Andrew Morton
2002-06-17 6:36 ` Jens Axboe
2002-06-17 7:09 ` Andrew Morton
2002-06-15 9:10 Adam J. Richter
2002-06-15 9:14 ` Jens Axboe
2002-06-15 8:52 Adam J. Richter
2002-06-15 9:00 ` Jens Axboe
2002-06-15 8:45 Adam J. Richter
2002-06-15 8:50 ` Jens Axboe
2002-06-15 4:38 Adam J. Richter
2002-06-15 0:22 Adam J. Richter
2002-06-14 16:52 Adam J. Richter
2002-06-14 23:00 ` Andrew Morton
2002-06-14 23:29 ` William Lee Irwin III
2002-06-14 23:38 ` Andrew Morton
2002-06-15 7:55 ` Jens Axboe
2002-06-14 1:56 Adam J. Richter
2002-06-14 2:24 ` Andreas Dilger
2002-06-14 14:57 ` 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=3D0A833E.3C396756@zip.com.au \
--to=akpm@zip.com.au \
--cc=adam@yggdrasil.com \
--cc=axboe@suse.de \
--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