public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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:00:52 -0700	[thread overview]
Message-ID: <3D0A75A4.AB34AC59@zip.com.au> (raw)
In-Reply-To: <200206141652.JAA26744@adam.yggdrasil.com>

"Adam J. Richter" wrote:
> 
>         That would be pretty nice too, but that lacks three potential
> advantages of my bio_chain appoach, in order of importance:
> 
>                 1. bio_chain is avoids memory allocation failures,
>                 2. bio_chain can start the first IO slightly sooner,
>                 3. bio_chain makes bio submitters slightly simpler.
> 
>         The disadvantage of my single I/O vector bio_chain apprach is
> that it results in another procedure call per vector.  We also already
> have code that builds multiple IO vectors in ll_rw_kio and the mpage.c
> routines.
> 
> ...

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.

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.

This is by no means finished.  Ultimately, I want to go into the
page allocator and snip off 16 pages in a single acquisition of
the zone lock.  Put these into the pagecache in a single acquisition
of the mapping lock.  Add them to the LRU with a single acquisition
of the pagemap_lru_lock.  Slot them all into a single BIO and send
them all off with a single submit_bio().  So the common-case unit of I/O
in the kernel will not be a page - it will be a great chunk of pages.

Everything is pretty much in place to do this now.  The main piece
which is missing is the gang page allocator (Hi, Bill).

It'll be damn fast, and nicely scalable.  It's all about reducing the
L1 cache footprint.  Making best use of data when it is in cache.
Making best use of locks once they have been acquired.  If it is
done right, it'll be almost as fast as 64k PAGE_CACHE_SIZE, with
none of its disadvantages.

In this context, bio_chain() is regression, because we're back
into doing stuff once-per-page, and longer per-page call graphs.
I'd rather not have to do it if it can be avoided.

-

  reply	other threads:[~2002-06-14 23:02 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-14 16:52 bio_chain: proposed solution for bio_alloc failure and large IO simplification Adam J. Richter
2002-06-14 23:00 ` Andrew Morton [this message]
2002-06-14 23:29   ` William Lee Irwin III
2002-06-14 23:38     ` Andrew Morton
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 23:39 Adam J. Richter
2002-06-14 23:58 ` Andrew Morton
2002-06-15  1:38   ` Oliver Xymoron
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=3D0A75A4.AB34AC59@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