From: Andrew Morton <akpm@osdl.org>
To: Johannes Stezenbach <js@linuxtv.org>
Cc: lkml@rtr.ca, dgc@sgi.com, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: dirty pages (Was: Re: [PATCH] Prevent large file writeback starvation)
Date: Mon, 13 Feb 2006 12:08:47 -0800 [thread overview]
Message-ID: <20060213120847.79215432.akpm@osdl.org> (raw)
In-Reply-To: <20060213135925.GA6173@linuxtv.org>
Johannes Stezenbach <js@linuxtv.org> wrote:
>
> On Mon, Feb 06, 2006, Andrew Morton wrote:
> > Mark Lord <lkml@rtr.ca> wrote:
> > >
> > > A simple test I do for this:
> > >
> > > $ mkdir t
> > > $ cp /usr/src/*.bz2 t (about 400-500MB worth of kernel tar files)
> > >
> > > In another window, I do this:
> > >
> > > $ while (sleep 1); do echo -n "`date`: "; grep Dirty /proc/meminfo; done
> > >
> > > And then watch the count get large, but take virtually forever
> > > to count back down to a "safe" value.
> > >
> > > Typing "sync" causes all the Dirty pages to immediately be flushed to disk,
> > > as expected.
> >
> > I've never seen that happen and I don't recall seeing any other reports of
> > it, so your machine must be doing something peculiar. I think it can
> > happen if, say, an inode gets itself onto the wrong inode list, or
> > incorrectly gets its dirty flag cleared.
> >
> > Are you using any unusual mount options, or unusual combinations of
> > filesystems, or anything like that?
>
> I've been seeing something like this for some time, but kept
> silent as I'm forced to use vmware on my Thinkpad T42p (1G RAM,
> but CONFIG_NOHIGHMEM=y).
> Sometimes 'sync' takes serveral seconds, even when the machine
> had been idle for >15mins. I don't have laptop mode enabled.
> so far I've not found a deterinistic way to reproduce this behaviour.
>
> Anyway, I temporarily deinstalled vmware (deleted the kernel
> modules and rebooted; kernel is still tainted because of madwifi
> if that matters).
> The behaviour I see with vmware (long 'sync' time) doesn't seem
> to happen without it so far, but:
vmware uses mmap a lot. Perhaps it's doing regular msyncs as well.
> Now copying a 700MB file makes "Dirty" go up to 350MB. It then
> slowly decreases to 325MB and stays there.
It shouldn't. Did you really leave it for long enough?
If you did, then why does it happen there and not here?
> However:
>
> $ time sync
>
> real 0m0.326s
> user 0m0.000s
> sys 0m0.280s
>
> and output from the dirty monitor one-liner:
>
> Mon Feb 13 14:31:43 CET 2006: Dirty: 325916 kB
> Mon Feb 13 14:31:44 CET 2006: Dirty: 325916 kB
> Mon Feb 13 14:31:45 CET 2006: Dirty: 4 kB
> Mon Feb 13 14:31:46 CET 2006: Dirty: 8 kB
>
>
> Clearly my notebook's hdd isn't that fast. ;-/
> What does "Dirty" in /proc/meminfo really mean?
The number of pages which are marked dirty, roughly.
In this case, all those pages' buffers had been written out by kjournald
behind the VM's back, so when the VM tried to write these "dirty" pages it
found that no I/O needed to be performed.
It would be nice if ext3 could clean the parent pages as it goes, but I
seem to recall deciding that this is not trivial. I guess we could get a
99.9% solution by trylocking the page.
next prev parent reply other threads:[~2006-02-13 20:09 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-06 4:00 [PATCH] Prevent large file writeback starvation David Chinner
2006-02-06 4:27 ` Andrew Morton
2006-02-06 5:48 ` David Chinner
2006-02-06 6:22 ` Andrew Morton
2006-02-06 6:36 ` Andrew Morton
2006-02-06 11:57 ` David Chinner
2006-02-06 11:55 ` David Chinner
2006-02-06 23:14 ` Andrew Morton
2006-02-07 0:34 ` David Chinner
2006-02-07 1:04 ` Andrew Morton
2006-02-07 1:31 ` David Chinner
2006-02-07 5:27 ` Andrew Morton
2006-02-07 7:42 ` David Chinner
2006-02-07 22:51 ` Andrew Morton
2006-02-07 7:49 ` David Chinner
2006-02-06 14:36 ` Mark Lord
2006-02-06 14:39 ` Mark Lord
2006-02-06 15:53 ` Several Hangs on diferent Hardwares and diferent kernels Pedro Alves
2006-02-06 20:11 ` [PATCH] Prevent large file writeback starvation Andrew Morton
2006-02-13 13:59 ` dirty pages (Was: Re: [PATCH] Prevent large file writeback starvation) Johannes Stezenbach
2006-02-13 20:08 ` Andrew Morton [this message]
2006-02-13 22:48 ` Johannes Stezenbach
2006-02-13 23:04 ` Andrew Morton
2006-02-13 23:31 ` Johannes Stezenbach
2006-02-13 23:52 ` Mark Lord
2006-02-14 0:50 ` Mark Lord
2006-02-14 16:32 ` Mark Lord
2006-04-11 12:42 ` Alexander Bergolth
2006-03-20 22:40 ` [PATCH] Prevent large file writeback starvation Alexander Bergolth
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=20060213120847.79215432.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=dgc@sgi.com \
--cc=js@linuxtv.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@rtr.ca \
/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
Powered by JetHome