From owner-freebsd-arch@FreeBSD.ORG Wed Jun 18 09:40:31 2003 Return-Path: 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 0A87037B401 for ; Wed, 18 Jun 2003 09:40:31 -0700 (PDT) Received: from sccrmhc11.attbi.com (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BFDD43F75 for ; Wed, 18 Jun 2003 09:40:30 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([12.233.125.100]) by attbi.com (sccrmhc11) with ESMTP id <2003061816402801100807u7e>; Wed, 18 Jun 2003 16:40:29 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id JAA38689; Wed, 18 Jun 2003 09:40:26 -0700 (PDT) Date: Wed, 18 Jun 2003 09:40:25 -0700 (PDT) From: Julian Elischer To: Poul-Henning Kamp In-Reply-To: <41012.1055950519@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: arch@freebsd.org Subject: Re: userland access to devices is moving! X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2003 16:40:31 -0000 cool.. how does 'mount' do this however, as it doesn't have a fd list to wok with. Or are you still leaving the vnode access path in place? On Wed, 18 Jun 2003, Poul-Henning Kamp wrote: > > I sat down and hacked up a simple prototype to test the concept I > have been rambling about for some years: Going directly from > filedescriptor to device driver thus bypassing the vnode, devfs and > specfs layer. > > I implemented this for /dev/null and /dev/zero, and ran the simple > benchmark "dd if=/dev/zero of=/dev/null count=1000000" > > Before: > N 3 Average: 44.900752667 Stddev: 0.049906338 > > After: > N 3 Average: 18.460190333 Stddev: 0.074019507 > > That is 26.4 microseconds saved for each read(2)+write(2) operation, > or 41% improvement on my Athlon 700MHz machine. > > A bit more locking will probably be needed, so this will erode some > of this number, but there will be something left I'm sure :-) > > The largest impact of this is that VOP_OPEN(), vn_open() and > vn_open_cred() grows an argument (the fdesc index) which existing > callers need to pass a -1, the rest is relatively local hacking in > devfs and some adjustments in the descriptor code. > > I have overall found that the implementation of this is not as hard > as I imagined, and if I doubted it before, I am now certain that > this is the right way to go. > > I should have tried this long time ago... > > patch at: > http://phk.freebsd.dk/patch/fdesc.patch > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" >