From owner-freebsd-arch@FreeBSD.ORG Mon Aug 22 13:40:34 2005 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69E1D16A41F for ; Mon, 22 Aug 2005 13:40:34 +0000 (GMT) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92A7B43D48 for ; Mon, 22 Aug 2005 13:40:33 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 16951 invoked from network); 22 Aug 2005 13:20:00 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.53]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 22 Aug 2005 13:20:00 -0000 Message-ID: <4309D5D7.C7C76B5B@freebsd.org> Date: Mon, 22 Aug 2005 15:40:39 +0200 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= References: <20050822100059.GA24626@FreeBSD.org> <863bp25c7t.fsf@xps.des.no> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: arch@freebsd.org, Alexey Dokuchaev Subject: Re: fdesc allocation optimization X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2005 13:40:34 -0000 Dag-Erling Smørgrav wrote: > > Alexey Dokuchaev writes: > > i've been browsing some of dfbsd resources recently, and found this one > > being pretty interesting: > > > > http://leaf.dragonflybsd.org/mailarchive/commits/2005-06/msg00526.html > > > > however, it seemingly did not get attention in our lists. so i am > > wondering if there are work/plans on porting hsu@'s work? i remember > > that at some point we adopted some openbsd-derived algorithm, but since > > matt states that this is "far better algorithm then anything we or > > freebsd thought up before", i figured it worth a look. > > Bollocks. Our current algorithm (which I wrote) is so fast you don't > even notice it's there. It's actually simpler than the OpenBSD code > from which it was inspired, and in theory it should be slower, but I > discovered that the overhead of the "better" algorithm was so high > that it consistently lost to the simpler one for reasonable amounts of > file descriptors (up to about 100,000 per process). > > The source code for the microbenchmark I used, and selected graphs > comparing my code to the previous implementation, are available at > . Wow, impressive! > (the strange artifacts you see on the red graphs are the result of the > file descriptor table overrunning the CPU cache) When did you commit this? Is it only in post 5.0 releases? -- Andre