git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
Cc: git@vger.kernel.org
Subject: Re: problem with git clone on cygwin
Date: Sun, 7 Jan 2007 01:00:08 -0500	[thread overview]
Message-ID: <20070107060007.GA10351@spearce.org> (raw)
In-Reply-To: <20070106170330.GA8041@scotty.home>

"Stefan-W. Hahn" <stefan.hahn@s-hahn.de> wrote:
> running git on Cygwin I have a problem with git clone on local disk,
> while packing data. 
> 
> The problem comes with v1.5.0-rc0. I bisected the problem down to
> commit 6d2fa7 as the first bad commit.

That was a performance improvement for Mac OS X to reduce the
index-pack time on linux.git from almost an hour to about 1 minute.
 
> It seems to be a problem with cygwin.dll prior v1.5.22 and pread(), if
> using an offset!=0. (I'm running cygwin.dll v1.5.21 build date
> 2006-07-27 and I can't update because of other compatibility problems).

Why can't you upgrade Cygwin?
 
> So I tried:
> - not to set NO_MMAP to use real mmap

FYI: you can "unset" NO_MMAP at compile time:

  make NO_MMAP=

or by putting it into your personal config.mak:

  echo NO_MMAP= >config.mak
  make

this way you always build with the real mmap, but don't need to
locally patch Makefile.

> - changing get_data_from_pack() from index-pack.c to used mmap() as
>   in 042aea8. (I did this because it directly uses pread().)
> This solved the problem for my testcase.

This isn't ideal because of the performance problems that some
OSes have with small but frequent mmap() calls.

Perhaps we should add our own fake pread (aka git_pread) to
git-compat-util.h and provide a NO_PREAD option in the Makefile?
Though I don't think its really worth it, as pretty much every
OS we run on should have a functioning pread call.  Except some
Cygwins apparently.

-- 
Shawn.

  parent reply	other threads:[~2007-01-07  6:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-06 17:03 problem with git clone on cygwin Stefan-W. Hahn
2007-01-06 21:40 ` Juergen Ruehle
     [not found]   ` <20070106215919.GB8041@scotty.home>
2007-01-07  9:30     ` Stefan-W. Hahn
2007-01-07 10:46       ` Juergen Ruehle
2007-01-07 11:21         ` Stefan-W. Hahn
2007-01-07  6:00 ` Shawn O. Pearce [this message]
2007-01-07 11:17   ` [PATCH] Replacing the system call pread() with real mmap() Stefan-W. Hahn
2007-01-07 11:24     ` Shawn O. Pearce
2007-01-07 16:36       ` Stefan-W. Hahn
2007-01-07 17:10         ` Johannes Schindelin
2007-01-07 20:01           ` Stefan-W. Hahn
2007-01-09 18:51         ` [PATCH] Test for failing pread() on cygwin Stefan-W. Hahn
2007-01-09 18:51         ` [PATCH] Replacing the system call pread() with lseek()/xread()/lseek() sequence Stefan-W. Hahn
2007-01-09 20:21           ` Junio C Hamano
2007-01-07 11:18   ` [PATCH] Test for failing pread() on cygwin Stefan-W. Hahn
2007-01-08  0:19     ` Horst H. von Brand
2007-01-08 17:09       ` Stefan-W. Hahn
     [not found] <11683687161816-git-send-email->

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=20070107060007.GA10351@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=stefan.hahn@s-hahn.de \
    /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).