git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Junio C Hamano <gitster@pobox.com>,
	"Shawn O. Pearce" <spearce@spearce.org>
Cc: Git Mailing List <git@vger.kernel.org>,
	David Michael Barr <david.barr@cordelta.com>,
	Sverre Rabbelier <srabbelier@gmail.com>,
	Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: Explanation for dropping write-back in mmap
Date: Mon, 7 Jun 2010 21:01:50 +0200	[thread overview]
Message-ID: <AANLkTinJE5blkIRPp5NDKEWVm2uv-Yelt_niYko6XZa_@mail.gmail.com> (raw)
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:
> 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.

> 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

  reply	other threads:[~2010-06-07 19:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07 15:16 Explanation for dropping write-back in mmap Ramkumar Ramachandra
2010-06-07 15:50 ` Shawn O. Pearce
2010-06-07 15:55 ` Junio C Hamano
2010-06-07 19:01   ` Ramkumar Ramachandra [this message]
2010-06-07 23:13     ` David Michael Barr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTinJE5blkIRPp5NDKEWVm2uv-Yelt_niYko6XZa_@mail.gmail.com \
    --to=artagnon@gmail.com \
    --cc=david.barr@cordelta.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=spearce@spearce.org \
    --cc=srabbelier@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).