mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Piggin <piggin@cyberone.com.au>
To: Andrew Morton <akpm@digeo.com>
Cc: helgehaf@aitel.hist.no, erik@hensema.net, linux-kernel@vger.kernel.org
Subject: Re: Delaying writes to disk when there's no need
Date: Tue, 01 Apr 2003 09:03:25 +1000	[thread overview]
Message-ID: <3E88C93D.3020107@cyberone.com.au> (raw)
In-Reply-To: <20030331144500.17bf3a2e.akpm@digeo.com>



Andrew Morton wrote:

>Nick Piggin <piggin@cyberone.com.au> wrote:
>  
>
>>it seems to me that
>>doing writeout whenever the disk would otherwise be idle
>>(and we have dirty memory to write out) would be a good
>>solution.
>>    
>>
>
>This is what the recently-removed BDI_read_active flag in backing_dev_info
>was supposed to be for.  I let it go because I don't think it's terribly
>important and it's time to stop fiddling with the vfs writeout code and it
>wasn't right anyway.
>
>Note that 2.5 starts pdflush writeout at 10% of memory dirty.  Or even lower
>if there is a lot of mapped memory around.  Whereas 2.4 will start background
>writeout at 30% or 40% dirty.  That's a fairly significant tuning change.
>
>The algorithm for utilisation of an idle disk should be, in
>balance_dirty_pages():
>
>	if (ps.nr_dirty + ps.nr_writeback < background_thresh) {
>		if (time_after(jiffies, bdi->last_read + HZ/100)) {
>			if (bdi->write_requests_in_flight < 2) {
>				struct writeback_control wbc = {
>					.bdi		= bdi,
>					.sync_mode	= WB_SYNC_NONE,
>					.nr_to_write	= write_chunk,
>				};
>
>				writeback_inodes(&wbc);
>			}
>		}
>		return;
>	}
>
>
>Or something like that.  It's pretty close.
>
Yeah something like that looks alright.

>
>It could have pretty bad failure modes.  Short-lived files in /tmp now
>perform writeout, which needs to be waited on when those files are removed.
>  
>
I didn't think of that.


  reply	other threads:[~2003-03-31 22:52 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 [this message]
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
     [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=3E88C93D.3020107@cyberone.com.au \
    --to=piggin@cyberone.com.au \
    --cc=akpm@digeo.com \
    --cc=erik@hensema.net \
    --cc=helgehaf@aitel.hist.no \
    --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

all inboxes | Powered by JetHome®