From owner-cvs-usrsbin Tue Jan 10 13:43:35 1995 Return-Path: cvs-usrsbin-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id NAA04985 for cvs-usrsbin-outgoing; Tue, 10 Jan 1995 13:43:35 -0800 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id NAA04979; Tue, 10 Jan 1995 13:43:14 -0800 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id IAA25273; Wed, 11 Jan 1995 08:42:53 +1100 Date: Wed, 11 Jan 1995 08:42:53 +1100 From: Bruce Evans Message-Id: <199501102142.IAA25273@godzilla.zeta.org.au> To: CVS-commiters@freefall.cdrom.com, cvs-usrsbin@freefall.cdrom.com, phk@freefall.cdrom.com Subject: Re: cvs commit: src/usr.sbin/kvm_mkdb kvm_mkdb.c nlist.c Sender: cvs-usrsbin-owner@FreeBSD.org Precedence: bulk > Modified: usr.sbin/kvm_mkdb kvm_mkdb.c nlist.c > Log: > Speed kvm_mkdb up by a factor 5 or thereabout. Rewrote all the fseek/fread > nonsense to use a mmap'ed file instead and told the DB/hash what we are up to. > > dev_mkdb could maybe benefit from the same treatment. I speeded it up by a factor of 10 or thereabouts by removing write-through of full blocks in ufs. (kvm, and potentially anything that does a lot of random access, writes to the same blocks many times.) Your fix works because there is no way to tell when an mmap'ed block is full, so the write-through pessimization cannot be applied. Bruce