public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: performance of O_DIRECT on md/lvm
Date: Mon, 21 Jan 2002 02:12:24 +0100	[thread overview]
Message-ID: <20020121021224.O21279@athlon.random> (raw)
In-Reply-To: <200201181743.g0IHhO226012@street-vision.com.suse.lists.linux.kernel> <3C48607C.35D3DDFF@redhat.com.suse.lists.linux.kernel> <20020120201603.L21279@athlon.random.suse.lists.linux.kernel> <p734rlg90ga.fsf@oldwotan.suse.de>
In-Reply-To: <p734rlg90ga.fsf@oldwotan.suse.de>; from ak@suse.de on Sun, Jan 20, 2002 at 10:28:21PM +0100

On Sun, Jan 20, 2002 at 10:28:21PM +0100, Andi Kleen wrote:
> Andrea Arcangeli <andrea@suse.de> writes:
> > 
> > if you read in chunks of a few mbytes per read syscall, the lack of
> > readahead shouldn't make much difference (this is true for both raid and
> > standalone device). If there's a relevant difference it's more liekly an
> > issue with the blocksize.
> 
> The problem with that is that doing overlapping IO requires much more
> effort (you need threads in user space). If you don't do overlapping
> IO you add a latency bubble for each round trip to user space after you
> read one big chunk and submitting the request for the next big chunk.
> Your disk will not be constantly streaming, because of these pauses where
> it doesn't have an request to process. 

correct, we can't keep the pipeline always full, the larger the size of
the read/write, the lower it will matter, this is the only way to hide
the pipeline stall at the moment (like with rawio).

> The application could do it using some aio setup, but it gets rather
> complicated and the kernel already knows how to do that well.

yes, in short the API to allow the userspace to keep the I/O pipeline
full with a ring of user buffers is not available at the moment.

As you say one could try to workaround it by threading the I/O in
userspace but it would get rather dirty (and with a scheduling
overhead).

> 
> I think an optional readahead mode for O_DIRECT would be useful. 

to do transparent readahead we'll need to use the pagecache, so we'd need
to make copies of pages with the cpu between usermemory and pagecache,
but the nicer part of O_DIRECT is that it skips the costly copies
with the cpu on the membus, so I usually disagree about trying to allow
O_DIRECT to support readahead. I believe if you need readahead, you
probably shouldn't use O_DIRECT in the first place.

Andrea

  parent reply	other threads:[~2002-01-21  1:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200201181743.g0IHhO226012@street-vision.com.suse.lists.linux.kernel>
     [not found] ` <3C48607C.35D3DDFF@redhat.com.suse.lists.linux.kernel>
     [not found]   ` <20020120201603.L21279@athlon.random.suse.lists.linux.kernel>
2002-01-20 21:28     ` performance of O_DIRECT on md/lvm Andi Kleen
2002-01-20 21:42       ` arjan
2002-01-21  1:12       ` Andrea Arcangeli [this message]
2002-01-21  5:35         ` Benjamin LaHaise
2002-01-21 14:41           ` Andrea Arcangeli
     [not found] <p734rlg90ga.fsf@oldwotan.suse.de.suse.lists.linux.kernel>
     [not found] ` <m16SPj2-000OVeC@amadeus.home.nl.suse.lists.linux.kernel>
2002-01-20 22:11   ` Andi Kleen
2002-01-18 17:43 Justin Cormack
2002-01-18 17:50 ` Arjan van de Ven
2002-01-20 19:16   ` Andrea Arcangeli

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=20020121021224.O21279@athlon.random \
    --to=andrea@suse.de \
    --cc=ak@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