mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Matt Klein <matt.klein@pikewerks.com>
Cc: Peter Zijlstra <peterz@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: Cached IO Synchronization Question
Date: Thu, 9 Apr 2009 13:56:27 +1000	[thread overview]
Message-ID: <200904091356.27466.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <49DCC936.70509@pikewerks.com>

On Thursday 09 April 2009 01:56:38 Matt Klein wrote:
> > 
> > Note how do_generic_file_read() checks PageUptodate() and does a
> > lock_page_killable() in case its not.
> > 
> > 
> > 
> 
> As far as I can tell there is nothing to prevent the page from becoming
> out of date (or someone doing a full page cached write) after the
> PageUptodate() check returns up to date.

Anything which marks the page not uptodate does not change the actual
page data, so the copy will still copy over valid data.

There is otherwise no synchronisation between reads and writes.

All we care about is that the data has been valid at some point in
time.

 
> So I have concluded that cached read/write interleaving is not
> synchronized. This is the behavior found on Windows.

Right.
 


      reply	other threads:[~2009-04-09  3:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-06 21:31 Matt Klein
2009-04-08 15:23 ` Peter Zijlstra
2009-04-08 15:56   ` Matt Klein
2009-04-09  3:56     ` Nick Piggin [this message]

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=200904091356.27466.nickpiggin@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.klein@pikewerks.com \
    --cc=peterz@infradead.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®