From b24b61b32a9fedc5de53427f16b7eb72e27e858d Mon Sep 17 00:00:00 2001 From: Bob Beck Date: Tue, 10 Jun 2008 20:14:38 +0000 Subject: Buffer cache revamp 1) remove multiple size queues, introduced as a stopgap. 2) decouple pages containing data from their mappings 3) only keep buffers mapped when they actually have to be mapped (right now, this is when buffers are B_BUSY) 4) New functions to make a buffer busy, and release the busy flag (buf_acquire and buf_release) 5) Move high/low water marks and statistics counters into a structure 6) Add a sysctl to retrieve buffer cache statistics Tested in several variants and beat upon by bob and art for a year. run accidentally on henning's nfs server for a few months... ok deraadt@, krw@, art@ - who promises to be around to deal with any fallout --- sys/miscfs/specfs/spec_vnops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/miscfs') diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index e175105abc1..3af4f6c1a10 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/specfs/spec_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spec_vnops.c,v 1.49 2008/05/08 17:45:45 thib Exp $ */ +/* $OpenBSD: spec_vnops.c,v 1.50 2008/06/10 20:14:36 beck Exp $ */ /* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */ /* @@ -447,7 +447,7 @@ loop: if ((bp->b_flags & B_DELWRI) == 0) panic("spec_fsync: not dirty"); bremfree(bp); - bp->b_flags |= B_BUSY; + buf_acquire(bp); splx(s); bawrite(bp); goto loop; -- cgit v1.2.3