From: Andrew Morton <akpm@digeo.com>
To: Nick Piggin <piggin@cyberone.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Delaying writes to disk when there's no need
Date: Mon, 31 Mar 2003 17:39:20 -0800 [thread overview]
Message-ID: <20030331173920.3ab5a53f.akpm@digeo.com> (raw)
In-Reply-To: <3E88EB3D.6020409@cyberone.com.au>
Nick Piggin <piggin@cyberone.com.au> wrote:
>
> Would the writeout on disk idle solve this without using the fadvise?
Yes it would schedule the I/O in the desired manner. But it would do that
for _all_ files, not just the desired one.
And that app needs to be changed to use fadvise anyway, to take down the
useless pagecache.
> How often is balance_dirty_pages called? Enough to keep an otherwise
> idle disk busy?
Approximately once per 1000 dirtied pages per cpu. Say 4 megs. A nice
chunk.
> Would it be possible to fix the /tmp files case? Could you cancel IO
> to a file that gets deleted?
Well... One could place a hint in the inode somewhere.
balance_dirty_pages() is given the inode, so it could notice that this is an
"early sync" inode and flush it every 4 megabytes.
That would be appropriate for O_STREAMING, which is a better and more
efficient interface than fadvise.
But really, the right thing to do here is to modify the app to use fadvise.
> On a similar note, would it be useful and not difficult to do
> speculative LIFO swapin in case of lots of free memory and an idle
> disk? Probably too hard. I guess lowering swapiness would help.
Might do. I'm not sure how though.
Another possibility would be to perform speculative writes. Write some
random data to a disk block and later see if that was the data which the
application actually wanted to write. If so, we can optimise away the later
I/O.
next prev parent reply other threads:[~2003-04-01 1:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-26 20:31 Erik Hensema
2003-03-27 9:06 ` Helge Hafting
2003-03-27 11:22 ` Erik Hensema
2003-03-28 23:12 ` Pavel Machek
2003-03-31 12:00 ` Erik Hensema
2003-03-31 13:42 ` Helge Hafting
2003-03-31 14:45 ` Oliver Neukum
2003-03-31 22:02 ` Nick Piggin
2003-03-31 22:22 ` Chris Friesen
2003-03-31 22:35 ` Nick Piggin
2003-03-31 22:51 ` John Bradford
2003-03-31 22:58 ` Nick Piggin
2003-03-31 22:45 ` Andrew Morton
2003-03-31 23:03 ` Nick Piggin
2003-03-31 23:32 ` Ingo Oeser
2003-04-01 0:02 ` Andrew Morton
2003-04-01 0:43 ` Daniel Pittman
2003-04-01 1:09 ` Andrew Morton
2003-04-01 1:34 ` Daniel Pittman
2003-04-01 1:45 ` Andrew Morton
[not found] ` <3E88EB3D.6020409@cyberone.com.au>
2003-04-01 1:39 ` Andrew Morton [this message]
[not found] <20030326204012$188c@gated-at.bofh.it>
[not found] ` <20030327091007$22a5@gated-at.bofh.it>
[not found] ` <20030327113014$37b4@gated-at.bofh.it>
2003-03-28 10:18 ` Tim Connors
2003-03-30 17:38 ` Helge Hafting
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=20030331173920.3ab5a53f.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=piggin@cyberone.com.au \
/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
all inboxes | Powered by JetHome®