From: Andy Isaacson <adi@hexapodia.org>
To: Andrew Morton <akpm@osdl.org>
Cc: bug-coreutils@gnu.org, linux-kernel@vger.kernel.org
Subject: Re: dd PATCH: add conv=direct
Date: Wed, 7 Apr 2004 14:47:27 -0500 [thread overview]
Message-ID: <20040407194727.GE2814@hexapodia.org> (raw)
In-Reply-To: <20040407123455.0de9ffa9.akpm@osdl.org>
On Wed, Apr 07, 2004 at 12:34:55PM -0700, Andrew Morton wrote:
> Andy Isaacson <adi@hexapodia.org> wrote:
> > Would there be any reason to allow O_DIRECT on the read side?
>
> Sure. It saves CPU,
OK, I can see that one. But it seems like a pretty small benefit to me
-- CPU utilization is already really low.
> avoids blowing pagecache,
Um, that sounds like a bad idea to me. It seems to me it's the kernel's
responsibility to figure out "hey, looks like a streaming read - let's
not blow out the buffer cache trying to hold 20GB on a 512M system." If
you're saying that the kernel guys have given up and the established
wisdom is now "you gotta use O_DIRECT if you don't want to throw
everything else out due to streaming data", well... I'm disappointed.
> just as with O_DIRECT writes.
Wouldn't opening both if= and of= with O_DIRECT turn dd into a
synchronous copier? That would really suck in the
"dd if=/dev/hda1 of=/dev/hdc1" case. With buffer cache doing
readahead, that command can get, say, 40MB/s read and 40MB/s write;
with synch read and synch write, it would drop to 40MB/s read+write,
assuming that block sizes are big enough to amortize seek overhead.
Having O_DIRECT on just of=, I think you can get back to 40MB/s+40MB/s.
I claim that O_DIRECT on of= is important because you just plain *can
not* do the minimal-sized IDE block scrub without it. I don't yet see a
similar benefit to O_DIRECT on if= side.
-andy
next prev parent reply other threads:[~2004-04-07 19:47 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-06 22:03 dd PATCH: add conv=direct Andy Isaacson
2004-04-07 0:33 ` Andrew Morton
2004-04-07 16:21 ` Bruce Allen
2004-04-07 16:42 ` Andrew Morton
2004-04-07 17:31 ` Andy Isaacson
2004-04-07 18:18 ` Andrew Morton
2004-04-07 19:24 ` Andy Isaacson
2004-04-07 19:34 ` Andrew Morton
2004-04-07 19:47 ` Andy Isaacson [this message]
2004-04-07 20:03 ` Andrew Morton
2004-04-07 20:43 ` Andy Isaacson
2004-04-07 21:00 ` Valdis.Kletnieks
2004-04-07 21:35 ` Bruce Allen
2004-04-08 6:56 ` Paul Eggert
2004-04-08 11:07 ` Jim Meyering
2004-04-08 19:32 ` Paul Eggert
2004-04-08 19:51 ` Paul Jarc
2004-04-08 21:34 ` Jim Meyering
2004-04-08 16:23 ` Philippe Troin
2004-04-08 20:20 ` dd patch to remove noctty Paul Eggert
2004-04-08 21:40 ` Jim Meyering
2004-04-09 0:37 ` dd PATCH: add conv=direct Anton Blanchard
2004-04-09 1:42 ` Wim Coekaerts
2004-04-10 21:28 ` Jim Meyering
2004-04-07 20:46 ` Paul Eggert
2004-04-07 21:06 ` Andrew Morton
2004-04-07 21:09 ` Andy Isaacson
2004-04-07 19:12 ` Miquel van Smoorenburg
2004-04-07 20:14 ` Andy Isaacson
2004-04-07 22:02 ` Nathan Straz
2004-04-07 22:09 ` Andy Isaacson
2004-04-08 11:44 ` Miquel van Smoorenburg
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=20040407194727.GE2814@hexapodia.org \
--to=adi@hexapodia.org \
--cc=akpm@osdl.org \
--cc=bug-coreutils@gnu.org \
--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;
as well as URLs for NNTP newsgroup(s).