lkml.org 
[lkml]   [2003]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Delaying writes to disk when there's no need
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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.103 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site