From owner-cvs-all Mon Nov 2 15:28:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA24967 for cvs-all-outgoing; Mon, 2 Nov 1998 15:28:11 -0800 (PST) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA24962; Mon, 2 Nov 1998 15:28:10 -0800 (PST) (envelope-from msmith@FreeBSD.org) From: Michael Smith Received: (from msmith@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id PAA15931; Mon, 2 Nov 1998 15:28:11 -0800 (PST) Date: Mon, 2 Nov 1998 15:28:11 -0800 (PST) Message-Id: <199811022328.PAA15931@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: cvs commit: src/sys/boot/alpha/common main.c src/sys/boot/alpha/libalpha srmdisk.c src/sys/boot/common bcache.c Makefile.inc bootstrap.h src/sys/boot/i386/libi386 biosdisk.c src/sys/boot/i386/loader main.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk msmith 1998/11/02 15:28:11 PST Modified files: sys/boot/alpha/common main.c sys/boot/alpha/libalpha srmdisk.c sys/boot/common Makefile.inc bootstrap.h sys/boot/i386/libi386 biosdisk.c sys/boot/i386/loader main.c Added files: sys/boot/common bcache.c Log: Implement a simple LRU block cache. By default this is initialised to 16k, and will bypass transfers for more than 8k. Blocks are invalidated after 2 seconds, so removable media should not confuse the cache. The 8k threshold is a compromise; all UFS transfers performed by libstand are 8k or less, so large file reads thrash the cache. However many filesystem metadata operations are also performed using 8k blocks, so using a lower threshold gives poor performance. Those of you with an eye for cache algorithms are welcome to tell me how badly this one sucks; you can start with the 'bcachestats' command which will print the contents of the cache and access statistics. Revision Changes Path 1.9 +6 -1 src/sys/boot/alpha/common/main.c 1.3 +13 -6 src/sys/boot/alpha/libalpha/srmdisk.c 1.7 +4 -3 src/sys/boot/common/Makefile.inc 1.16 +10 -1 src/sys/boot/common/bootstrap.h 1.17 +12 -1 src/sys/boot/i386/libi386/biosdisk.c 1.14 +6 -1 src/sys/boot/i386/loader/main.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message