Messages in this thread | | | Date | Fri, 19 Nov 2004 09:42:03 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: [PATCH 17/20] FRV: Better mmap support in uClinux |
| |
On Fri, 19 Nov 2004, David Howells wrote: > > > > Don't forget write() too. If someone does a write, that would have to be > > > written over the mapping too. Obviously this is not impossible. > > > > I don't see such a requirement, but it'd be nice, yes. > > I think it is a requirement. With normal Linux, if you do a write that crosses > a shared mmap it will change the mmapped data.
Indeed.
Some other UNIXes are broken in this regard, and there are cache coherency issues on some platforms that people who depend on this behaviour may need to be aware of, but in general Linux has always gone for coherenct mmap's.
POSIX doesn't require it, but quite frankly, non-coherent shared mmap just isn't worth it. You might as well not support it at all at that point.
[ I think at least HP-UX used to be broken in this regard, but HP-UX had such atrocious mmap behaviour _anyway_ that I don't understand how anybody could use it (you couldn't munmap partial mappings etc). I think they finally fixed it a few years ago and updated their source base from some totally ancient BSD to something a bit more modern. ]
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/
| |