Bug 179911 - mmaping over NFS: msync(MS_INVALIDATE) does not do anything.
mmaping over NFS: msync(MS_INVALIDATE) does not do anything.
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
high Severity medium
: ---
: ---
Assigned To: Steve Dickson
Brian Brock
: FutureFeature
: 137330 (view as bug list)
Depends On:
Blocks: 184317
  Show dependency treegraph
Reported: 2006-02-03 15:09 EST by Daniel Riek
Modified: 2007-11-30 17:07 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-10-23 10:40:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Comment 1 Ernie Petrides 2006-02-03 18:43:00 EST
*** Bug 137330 has been marked as a duplicate of this bug. ***
Comment 7 Amit Gud 2006-08-07 17:44:38 EDT
If I'm not wrong, it shouldn't (at least for NFSv3). In fact the case is,
currently MS_INVALIDATE is of no use to us because of the way Linux implements
shared mmap - processes mmapping a common file simply share the memory pages.
So, rightly so, it turns out that MS_INVALIDATE is effectively an implicit
no-op, and currently there are no takers.

SuSv3 standard 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."

This makes sense for a network file system (like NFS!) that all the client
caches (mmappings) of the data (file) be invalidated. But, being stateless, NFS
server doesn't care about which clients uses what files and how. So IMO, for NFS
MS_INVALIDATE is again a no-op.
Comment 9 RHEL Product and Program Management 2006-10-23 10:40:35 EDT
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request. 

Note You need to log in before you can comment on or make changes to this bug.