lkml.org 
[lkml]   [2003]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Alternate futex non-page-pinning and COW fix

On Wed, 3 Sep 2003, Hugh Dickins wrote:
>
> Of course (not). That's the point, they do work on private mappings, but
> the semantics are different on private mappings from on shared mappings:
> on private mappings they're private to the mm, on shared mappings they're
> shared with other mms (via the shared file).

That's not true. It never has been true in Linux.

Private mappings that haven't been broken by COW (and a read-only mapping
never will be) will see updates as they happen on the file that backs it.
That's the fundamental difference between "mmap(MAP_PRIVATE)" and
"read()".

You may not like it, and others too have not liked it (Hurd and Mach do
this big dance about MAP_COPY that really creates a static _copy_ of the
state at the time of the mmap), but it's just a fact.

Repeat after me: private read-only mappings are 100% equivalent to shared
read-only mappings. No ifs, buts, or maybes. This is a FACT. It's a fact
codified in many years of Linux implementation, but it's a fact outside of
that too.

(Yeah, yeah, I know some broken old Unixes do not offer mmap consistency
guarantees, and nntpd is unhappy. But Linux isn't broken.)

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.107 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site