git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Explanation for dropping write-back in mmap

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Jun 7, 2010, 19:01 UTC
Message-ID
<AANLkTinJE5blkIRPp5NDKEWVm2uv-Yelt_niYko6XZa_@mail.gmail.com>
In-Reply-To
<7vbpbmx2er.fsf@alter.siamese.dyndns.org>
Hi Junio and Shawn,
Shawn O. Pearce wrote:
> I would strongly suggest finding another way to implement the SVN
> exporter, without using MAP_SHARED.

David has already started working on using realloc + persist, but I'd like to know the reason for your recommendation- is it simply because mmap with MAP_SHARED is difficult to port, or is there some other reason as well?

Junio C Hamano wrote:
Show 7 quoted lines
> I don't think we _dropped_ a _working_ support that allowed shared
> mapping.  IIRC the implementation emulated only private mapping well
> enough to support the use of mmap() in our codebase (iow, instead of
> allocating a buffer and reading into it and possibly mucking with it
> without affecting outside world, map it to read and then possibly mucking
> with it), but lacked input validation to make sure that no caller
> mistakenly thinks the implementation could satisfy non private mapping.
Ah, so you did it for safety/ sanity reasons back then.
Show 5 quoted lines
> Also I don't think I did this without telling other people---it would be a
> lot more likely that somebody else noticed it and the issue was discussed
> on the list and resulted in this commit.  I would check the commit date
> and see the discussion around that time if I were you to learn the
> backstory.

Right. Thanks for this- I read the "First cut at git port to Cygwin" thread and learnt the backstory.

-- Ram
Previous: Junio C HamanoNext: David Michael Barr
Message 4 of 5 in “Explanation for dropping write-back in mmap”
  1. Ramkumar RamachandraJun 7, 2010
  2. Shawn O. PearceJun 7, 2010
  3. Junio C HamanoJun 7, 2010
  4. Ramkumar RamachandraJun 7, 2010
  5. David Michael BarrJun 7, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.