X-Spam-Check-By: sourceware.org
Date: Thu, 18 Jan 2007 10:14:00 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: 1.7.0 CVS mmap failure
Message-ID: <20070118091400.GC27843@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <Pine.CYG.4.58.0701051054010.280@PC1163-8460-XP.flightsafety.com> <Pine.CYG.4.58.0701051144030.2880@PC1163-8460-XP.flightsafety.com> <20070105182234.GC12776@calimero.vinschen.de> <Pine.CYG.4.58.0701051237090.2880@PC1163-8460-XP.flightsafety.com> <20070105192302.GD12776@calimero.vinschen.de> <20070110095345.GL23638@calimero.vinschen.de> <Pine.CYG.4.58.0701100903410.3236@PC1163-8460-XP.flightsafety.com> <Pine.CYG.4.58.0701161717400.2732@PC1163-8460-XP.flightsafety.com> <20070117103959.GA23172@calimero.vinschen.de> <Pine.CYG.4.58.0701171237581.2732@PC1163-8460-XP.flightsafety.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.CYG.4.58.0701171237581.2732@PC1163-8460-XP.flightsafety.com>
User-Agent: Mutt/1.4.2.2i
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Jan 17 13:42, Brian Ford wrote:
> On Wed, 17 Jan 2007, Corinna Vinschen wrote:
> > On Jan 16 17:28, Brian Ford wrote:
> > > PS: In an strace of this, I see three fstat64s called from within a
> > > single mmap64.  Do you know where they all are, and if two should be
> > > optimized away?
> >
> > There's only one such call in list::set.
> 
> which is called from map::add_list, yes.  I also see one in
> map::get_list_by_fd.

Uh, yes.

> mmap.cc:1203 mmap64():
>   map_list = mmapped_areas.get_list_by_fd (fd);
> mmap.cc:982 mmap_worker():
>   if (!(map_list = mmapped_areas.get_list_by_fd (fd))
> mmap.cc:983 mmap_worker():
>   && !(map_list = mmapped_areas.add_list (fd)))
> 
> Also:
> 
> mmap.cc:1134 mmap64():
>   DWORD low = GetFileSize (fh->get_handle (), &high);
> 
> > STC?
> 
> It looks like your statement is true for the first mmap in a process, but
> subsequent mmaps have significant overhead.  In the attached STC, I count
> 5 fstat64s of the same fd via strace, plus the GetFileSize mentioned
> above.
> 
> PS. Since this isn't a bug, I don't expect you to do any more than
> consider putting it in your long term low priority que or reply with a PTC
> Thanks for the evaluation tuits ;-).

Right, it's an optimization problem rather than a bug.  Patches
welcome, but I've put it on my TODO list, too.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

