From owner-freebsd-current@FreeBSD.ORG Mon Aug 22 08:33:24 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E51F016A41F; Mon, 22 Aug 2005 08:33:24 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.10.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5041C43D49; Mon, 22 Aug 2005 08:33:23 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.4/8.13.3) with ESMTP id j7M8XKak032778 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 22 Aug 2005 10:33:20 +0200 (CEST) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.4/8.13.3/Submit) id j7M8XK7d032777; Mon, 22 Aug 2005 10:33:20 +0200 (CEST) Date: Mon, 22 Aug 2005 10:33:20 +0200 From: Divacky Roman To: Giorgos Keramidas Message-ID: <20050822083320.GA32668@stud.fit.vutbr.cz> References: <20050821084546.GA77111@stud.fit.vutbr.cz> <20050821175406.GA36164@xor.obsecurity.org> <20050822074002.GA31176@stud.fit.vutbr.cz> <20050822074932.GA2264@beatrix.daedalusnetworks.priv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050822074932.GA2264@beatrix.daedalusnetworks.priv> User-Agent: Mutt/1.4.2i X-Scanned-By: MIMEDefang 2.49 on 147.229.10.14 Cc: freebsd-current@freebsd.org, Kris Kennaway Subject: Re: [PATCH]: fdalloc optimization X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2005 08:33:25 -0000 On Mon, Aug 22, 2005 at 10:49:32AM +0300, Giorgos Keramidas wrote: > On 2005-08-22 09:40, Divacky Roman wrote: > >On Sun, Aug 21, 2005 at 01:54:06PM -0400, Kris Kennaway wrote: > >>On Sun, Aug 21, 2005 at 10:45:46AM +0200, Divacky Roman wrote: > >>> I made a patch for fdalloc which could speed it up a bit, its stored under > >>> kern/85176 or http://hysteria.sk/~neologism/kern_descrip.patch > >> > >> That's all nice and everything, but *does* it speed it up a bit? :-) > > > > ie. its never slower but I think this is insignificant. on the other hand - > > buildkernel is not that fdalloc sensitive. dont know how to measure it ;( > > By running an application that opens (and keeps open) many files, i.e. > a program that creates many temporary files, keeps them open and then > closes them all at once before exiting? I did: gettimeofday(&t1, NULL); for (; i>0; i--) { if (open("/dev/null", O_RDONLY) == -1) { perror(NULL); break; } } gettimeofday(&t2, NULL); tested by: #!/bin/csh set i=100; while ($i > 0) @ i-- rtprio 10 ./a.out end and ministat showed: x /tmp/old_kernel + /tmp/new_kernel +--------------------------------------------------------------------------+ | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | +x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x | | *x x| | *x x| | *x *| | *x *| | *x *| |||________MMA_A________|___| | +--------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 100 39957 959570 41444 87169.69 201011.84 + 100 37786 962107 38766 66353.09 158258.74 No difference proven at 95.0% confidence anyway - commenting out duplicate code MUST speed it up, maybe insignificantly but still ;) roman