From: Andrew Morton <akpm@osdl.org>
To: Grzegorz Kulewski <kangur@polcom.net>
Cc: Andrzej Szymanski <szymans@agh.edu.pl>, linux-kernel@vger.kernel.org
Subject: Re: Strange write starvation on 2.6.17 (and other) kernels
Date: Tue, 15 Aug 2006 07:04:48 -0700 [thread overview]
Message-ID: <20060815070448.bcd1a67f.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.63.0608151439080.8124@alpha.polcom.net>
On Tue, 15 Aug 2006 14:40:48 +0200 (CEST)
Grzegorz Kulewski <kangur@polcom.net> wrote:
> On Tue, 15 Aug 2006, Andrew Morton wrote:
> > Which filesystem?
> >
> > If ext3 in ordered-data mode: any fsync() will sync the whole filesystem
> > (it has to).
>
> Could you explain some more why it has to?... Is this caused by design of
> ext3 or any filesystem in ordered-data mode has to do it?
>
The journal is a shared resource - a single swipe of disk which is written
(logically) atomically and which contains the metadata modifications for
many files. As filesystem activity proceeds we attach more and more
metadata blocks to the journal and when a commit happens we write them all
out in one hit.
Hence an fsync() of a single file ends up journalling the metadata for all
files which have pending metadata writes.
And in data=ordered mode the filesystem must write all the user-data for a
file before it writes the metadata which refers to that data.
IOW, a single fsync() triggers the journalling of all file metadata which
requires the writing of all file data.
In data=writeback mode the fs doesn't have the requirement that file
user-data be written prior to the journalling of the metadata which refers
to that data, so we can leave the pagecache for all the non-fsynced files
floating about in memory, still dirty.
next prev parent reply other threads:[~2006-08-15 14:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-14 16:36 Strange write starvation on 2.6.17 (and other) kernels Andrzej Szymanski
2006-08-14 18:46 ` Jeff V. Merkey
2006-08-14 23:28 ` Grant Coady
2006-08-15 7:50 ` Andrew Morton
2006-08-15 7:51 ` Andrew Morton
2006-08-15 12:40 ` Grzegorz Kulewski
2006-08-15 14:04 ` Andrew Morton [this message]
2006-08-15 18:40 ` Jason Lunz
2006-08-16 20:54 ` Andrzej Szymanski
2006-08-17 8:36 ` Miquel van Smoorenburg
2006-08-21 1:31 ` Neil Brown
2006-08-21 12:40 ` Andrzej Szymanski
2006-08-22 7:40 ` Neil Brown
2006-08-25 5:41 ` Neil Brown
2006-08-25 8:46 ` Andrzej Szymanski
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=20060815070448.bcd1a67f.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=kangur@polcom.net \
--cc=linux-kernel@vger.kernel.org \
--cc=szymans@agh.edu.pl \
/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