Justin,

> On Mon, May 15, 2006 at 10:06:29PM +0200, Michael Kerrisk wrote:
> > > > > changes:
> > > > >   make mmap.2 reference mincore
> > > > 
> > > > Done, for 2.33.
> > > > 
> > > > >   explicitly state that a read-only MAP_PRIVATE is equivalent to
> > > > >   MAP_SHARED 
> > > > 
> > > > *why?*  You do not explain what benefit this serves.
> > > Because, upon reflection, it isn't immediately clear from the wording
> > > of the page as it exists now.  In particular:
> > > 
> > >   Create a  private  copy-on-write  mapping
> > 
> > Umm -- we were talking about read-only mappings?
> Yes; I wish to make it clear that, for a read-only map, the behaviour
> is the same.
> 
> > > This could be interpretted as meaning "create a new mapping, even if
> > > the file is already mapped", which isn't what people usually want, 
> > > and isn't what it does anyway..
> > >
> > > > > An alternative would be to take the commented-out Linus quote 
> > > > > embedded
> > > > > in mmap.2 which says precisely what I want and create a NOTES
> > > > > section
> > > > > out of it.
> > 
> > Let me put things another way: why should a programmer care
> > about whether read-only mappings are done the same way
> > internally for both MAP_SHARED and MAP_PRIVATE?
> A programmer should care whether using MAP_PRIVATE uses extra
> resources  than a MAP_SHARED (both maps presumably have some
> overhead, for the initial mapping and for each additional mapping).  I
> question whether this is presently as clear as it should be.

But:

-- you have not demonstrated that there is any significant 
   difference?

-- whether there is a difference on other Unix systems
   (if they show different perfomance characteristics,
   then the man-pages should not make recommendations).

> I think it is typical to need to have *some* understanding of a lower
> layer interface than one uses directly, even if the full
> implementation details are deliberately opaque.

I'm interested in specifics at this point.

> Would it be better to change the descriptions of MAP_{PRIVATE,SHARED}
> themselves?  If you think so, I can suggest something.

No, i don't think any change is warranted.

This sounds awfully like another speculative bug report...

Cheers,

Michael

-- 
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7 

Want to help with man page maintenance?  
Grab the latest tarball at
ftp://ftp.win.tue.nl/pub/linux-local/manpages/, 
read the HOWTOHELP file and grep the source 
files for 'FIXME'.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to