From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Schindelin Subject: Re: Cygwin can't handle huge packfiles? Date: Mon, 3 Apr 2006 17:12:55 +0200 (CEST) Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Kees-Jan Dijkzeul , git@vger.kernel.org X-From: git-owner@vger.kernel.org Mon Apr 03 17:13:22 2006 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FQQjv-0007P6-9V for gcvg-git@gmane.org; Mon, 03 Apr 2006 17:13:12 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751659AbWDCPNG (ORCPT ); Mon, 3 Apr 2006 11:13:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751668AbWDCPNG (ORCPT ); Mon, 3 Apr 2006 11:13:06 -0400 Received: from mail.gmx.de ([213.165.64.20]:42718 "HELO mail.gmx.net") by vger.kernel.org with SMTP id S1751659AbWDCPNF (ORCPT ); Mon, 3 Apr 2006 11:13:05 -0400 Received: (qmail invoked by alias); 03 Apr 2006 15:13:03 -0000 Received: from lxweb002.wuerzburg.citynet.de (EHLO localhost) [81.209.129.202] by mail.gmx.net (mp035) with SMTP; 03 Apr 2006 17:13:03 +0200 X-Authenticated: #1490710 X-X-Sender: gene099@wbgn013.biozentrum.uni-wuerzburg.de To: Linus Torvalds In-Reply-To: X-Y-GMX-Trusted: 0 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Hi, On Mon, 3 Apr 2006, Linus Torvalds wrote: > On Mon, 3 Apr 2006, Johannes Schindelin wrote: > > > > The problem is not mmap() on cygwin, but that a fork() has to jump through > > loops to reinstall the open file descriptors on cygwin. If the > > corresponding file was deleted, that fails. Therefore, we work around that > > on cygwin by actually reading the file into memory, *not* mmap()ing it. > > Well, we could actually do a _real_ mmap on pack-files. The pack-files are > much better mmap'ed - there we don't _want_ them to be removed while we're > using them. It was the index file etc that was problematic. > > Maybe the cygwin fake mmap should be triggered only for the index (and > possibly the individual objects - if only because there doing a > malloc+read may actually be faster). I hit the problem *only* with "git-whatchanged -p". Which means that the upcoming we-no-longer-write-temp-files-for-diff version should make that gitfakemmap() hack obsolete. (I have not checked whether there are other places where a file is mmap()ed and then used by a fork()ed process.) Ciao, Dscho