public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <mason@suse.com>
To: "Stephen C. Tweedie" <sct@redhat.com>
Cc: Andrew Morton <akpm@digeo.com>,
	lkml <linux-kernel@vger.kernel.org>,
	ext3 users list <ext3-users@redhat.com>
Subject: Re: [patch] fix the ext3 data=journal unmount bug
Date: 06 Dec 2002 15:34:18 -0500	[thread overview]
Message-ID: <1039206858.9244.130.camel@tiny> (raw)
In-Reply-To: <1039204675.5301.55.camel@sisko.scot.redhat.com>

On Fri, 2002-12-06 at 14:57, Stephen C. Tweedie wrote:
> Hi,
> 
> On Fri, 2002-12-06 at 19:45, Andrew Morton wrote:
> 
> > > I see what ext3 gains from your current patch in the unmount case, but
> > > the sync case is really unchanged because of interaction with kupdate.
> > 
> > True.  And I'd like /bin/sync to _really_ be synchronous because
> > I use `reboot -f' all the time.  Even though SuS-or-POSIX say that
> > sync() only needs to _start_ the IO.  That's rather silly.
> 
> But at the same time I'd like to avoid sync becoming serialised on its
> writes.  If you've got a lot of filesystems mounted, doing each
> filesystem's sync sequentially and synchronously is going to be a lot
> slower than allowing async syncs.  In other words, for sync(2) we really
> want async commit submission followed by a synchronous wait for
> completion.  And that's probably more churn than I'd like to see at this
> stage for 2.4.

The bulk of the sync(2) will be async though, since most of the io is
actually writing dirty data buffers out.  We already do that in two
stages.

For 2.5, if an FS really wanted a two stage sync for it's non-data
pages, it could put a locked page onto one of the lists that
sync_inodes(1) will catch and wait for.  There are lots of other ways of
course, but there's already a framework for sync to wait on pages.

For 2.4, an FS async sync function could toss a locked buffer head into
the locked buffer lru list, and unlock when the commit is complete.

Neither idea is as clean as a real aio interface, but all the
infrastructure is already there. 

Also, I think async sync support is a different feature than allowing
the FS to know the difference between kupdate periodic writes and
syncs/unmounts.

-chris



  reply	other threads:[~2002-12-06 20:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-06  5:52 [patch] fix the ext3 data=journal unmount bug Andrew Morton
2002-12-06 18:02 ` Chris Mason
2002-12-06 19:12   ` Andrew Morton
2002-12-06 19:34     ` Chris Mason
2002-12-06 19:45       ` Andrew Morton
2002-12-06 19:57         ` Stephen C. Tweedie
2002-12-06 20:34           ` Chris Mason [this message]
2002-12-06 21:22             ` Stephen C. Tweedie
2002-12-06 22:07               ` Chris Mason
2002-12-06 22:25                 ` Stephen C. Tweedie
2002-12-07 14:54 ` Matthias Andree

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=1039206858.9244.130.camel@tiny \
    --to=mason@suse.com \
    --cc=akpm@digeo.com \
    --cc=ext3-users@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sct@redhat.com \
    /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