From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1488 invoked by alias); 17 Jul 2007 20:32:44 -0000 Received: (qmail 1480 invoked by uid 22791); 17 Jul 2007 20:32:43 -0000 X-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 17 Jul 2007 20:32:35 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l6HKWXAw028724 for ; Tue, 17 Jul 2007 16:32:33 -0400 Received: from pobox.hsv.redhat.com (pobox.hsv.redhat.com [172.16.16.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l6HKWWBH029674; Tue, 17 Jul 2007 16:32:32 -0400 Received: from localhost.localdomain (dhcp-232.hsv.redhat.com [172.16.17.232]) by pobox.hsv.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l6HKWVGv011901; Tue, 17 Jul 2007 16:32:31 -0400 Message-ID: <469D275C.9010108@redhat.com> Date: Tue, 17 Jul 2007 20:32:00 -0000 From: Phil Muldoon User-Agent: Thunderbird 2.0.0.4 (X11/20070615) MIME-Version: 1.0 To: Mike Cvet CC: frysk Subject: Re: uslurp change References: <469D25B6.5040804@redhat.com> In-Reply-To: <469D25B6.5040804@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q3/txt/msg00144.txt.bz2 Mike Cvet wrote: > Code in frysk-sys/proc/cni/slurp.cxx : uslurp which previously was: > > int fd = ::open (file, O_RDONLY); > if (errno != 0) { > ::free(buf); > return NULL; > > Has been changed to replicate behaviour seen in FileDescriptor.cxx > where, if the maximum number of file descriptors has been reached, the > garbage collector will be continually prodded until some descriptors > get freed up. > Mike uslurp is a "special case" function for /proc/$$/maps which can be large. It does the realloc dance on multiple 4k page reads while slurp just reads one page from /proc. The older slurp still does the vast majority of reads from /proc, so this optimization will be needed there to. I cannot think of a reason why I just did not replace uslurp with slurp many moons ago, but thinking about it, it probably should. Regards Phil