public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk" <michael.kerrisk@gmx.net>
To: unlisted-recipients:; (no To-header on input)
Cc: Jamie Lokier <jamie@shareable.org>
Subject: MS_INVALIDATE broken, what alternative?
Date: Wed, 28 Apr 2004 11:51:14 +0200	[thread overview]
Message-ID: <408F9AB2.26880.AE166D@localhost> (raw)

Gidday,

The msync() MS_INVALIDATE operation should produce behavior something like 
the following:

Invalidate cached copies of mapped data: the mapped region is synchronized 
with the contents of the file.  All pages of the mapped region that are 
inconsistent with the underlying file data are marked as invalid, and when 
next referenced, the contents of the page will be copied from the 
corresponding location in the file.  As a result, any changes that have 
been made directly to the file by another process using write() are made 
visible in the mapped region.

(To be precise, SUSv3 says:

    When MS_INVALIDATE is specified, msync( ) shall invalidate 
    all cached copies of mapped data that are inconsistent with 
    the permanent storage locations such that subsequent 
    references shall obtain data that was consistent with the 
    permanent storage locations sometime between the call to 
    msync( ) and the first subsequent memory reference to the data.
)

However as noted in a recent thread 
(http://marc.theaimsgroup.com/?l=linux-kernel&m=108083668427418&w=2), 
the current Linux implementation of this flag is broken: it provides 
behavior equivalent to flags==0.

Is there any way of achieving this functionality with current kernels?  
(Or might MS_INVALIDATE actually get correctly implemented?)

Thanks,

Michael
--
Michael Kerrisk
michael.kerrisk@gmx.net






                 reply	other threads:[~2004-04-28  9:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=408F9AB2.26880.AE166D@localhost \
    --to=michael.kerrisk@gmx.net \
    --cc=jamie@shareable.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