From: Roger Larsson <roger.larsson@norran.net>
To: linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] Copy on First Read?
Date: Mon, 10 Jul 2006 22:42:52 +0200 [thread overview]
Message-ID: <200607102242.53263.roger.larsson@norran.net> (raw)
In-Reply-To: <20060710175927.GA16137@thunk.org>
On Monday 10 July 2006 19:59, Theodore Tso wrote:
> On Mon, Jul 10, 2006 at 12:25:46PM +0200, Roger Larsson wrote:
> > Not double since it is only the first read after a write that needs to be
> > rewritten. My assumption is that most files are written fewer times than
> > they are read. And the read for the copy is free since that was what
> > triggered it.
>
> But there is a cost, and the question is how much does this buy you
> compared to simply getting it right the first time, either via a
> delayed allocation scheme, or where the application knows how big the
> file is up front (as is often the case).
But is the size of the file ALL that is needed?
Isn't it interesting to make use of
- What is it written together with.
- What is it read together with.
Lets take a look at a use case, downloading and compiling a kernel.
Download goes to the write buffer, delayed enough to notice that it is big.
tar to extract
read triggers a copy operation -> copy can be made continuous since the
size is known. This results in two continuous writes one for the copy
operation. The other for extracted files put in 'write' part.
make oldconfig
config file related stuff will be copied from 'write'.
make
copy files together as they are used.
object files are written to 'write' part - continously.
link will move them together as they are used.
(Yes, temporary files is a problem - delayed write?)
Redoing a make should do quite well regarding where files are placed relative
to each other...
Does other allocation schemes really do better without later moving the files?
/RogerL
prev parent reply other threads:[~2006-07-10 20:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 7:04 [RFC] Copy on First Read? Roger Larsson
2006-07-10 8:27 ` Andreas Dilger
2006-07-10 10:25 ` Roger Larsson
2006-07-10 17:59 ` Theodore Tso
2006-07-10 20:42 ` Roger Larsson [this message]
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=200607102242.53263.roger.larsson@norran.net \
--to=roger.larsson@norran.net \
--cc=linux-fsdevel@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