mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: Andrew Morton <akpm@zip.com.au>,
	linux-kernel@vger.kernel.org,
	"Carter K. George" <carter@polyserve.com>,
	Don Norton <djn@polyserve.com>,
	"James S. Tybur" <jtybur@polyserve.com>
Subject: Re: fsync fixes for 2.4
Date: Fri, 12 Jul 2002 00:57:48 +0200	[thread overview]
Message-ID: <20020711225748.GN1342@dualathlon.random> (raw)
In-Reply-To: <Pine.LNX.4.44.0207111710470.21365-100000@freak.distro.conectiva>

On Thu, Jul 11, 2002 at 05:21:24PM -0300, Marcelo Tosatti wrote:
> 
> 
> On Wed, 10 Jul 2002, Andrea Arcangeli wrote:
> 
> > At polyserve they found a severe problem with fsync in 2.4.
> >
> > In short the write_buffer (ll_rw_block of mainline) is a noop if old I/O
> > is in flight. You know the buffer can be made dirty while I/O is in
> > flight, and in such case fsync would return without flushing the dirty
> > buffers at all. Their proposed fix is strightforward, just a
> > wait_on_buffer before the ll_rw_block will guarantee somebody marked the
> > bh locked _after_ we wrote to it.
> 
> >From what I can see the problem goes like:
> 
> 
> thread1				thread2
> 				writepage(page) (marks the buffers clean, page is
> 				locked for IO)
> 
> mark_buffer_dirty()
> 
> fsync()
> 
> fsync_buffers_list() finds
> the dirtied buffer, but since
> its locked ll_rw_block() returns
> without queueing the data.
> 
> fsync_buffers_list() waits on the writepage()'s
> write to return but not on latest data write.
> 
> 
> Is that what you mean or I'm misunderstanding something?

yes, that's it.

Andrea

  reply	other threads:[~2002-07-12  1:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-10 20:20 Andrea Arcangeli
2002-07-11 20:21 ` Marcelo Tosatti
2002-07-11 22:57   ` Andrea Arcangeli [this message]
2002-07-12  0:51     ` Marcelo Tosatti
2002-07-12  1:52       ` Andrea Arcangeli
2002-07-12  2:59         ` Marcelo Tosatti
2002-07-11 21:57 ` J.A. Magallon
2002-07-11 23:00   ` Andrea Arcangeli
2002-07-12 21:52 Griffiths, Richard A
2002-07-12 22:21 ` Andrew Morton
2002-07-15 10:07 ` Andrea Arcangeli
2002-07-15 18:36   ` Andrew Morton
2002-07-17 14:44   ` mgross
2002-07-17 20:05     ` Andrea Arcangeli

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=20020711225748.GN1342@dualathlon.random \
    --to=andrea@suse.de \
    --cc=akpm@zip.com.au \
    --cc=carter@polyserve.com \
    --cc=djn@polyserve.com \
    --cc=jtybur@polyserve.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /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®