summaryrefslogtreecommitdiff
path: root/sys/kern/spec_vnops.c
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2013-06-11 19:01:21 +0000
committerBob Beck <beck@cvs.openbsd.org>2013-06-11 19:01:21 +0000
commita04cd4407a8b46989eda57407c34a81fd0c94229 (patch)
tree582a477b3a0350d8234ed93d0ec5b3e361db2bb5 /sys/kern/spec_vnops.c
parentb46bdc87d12f64a73dd9be1af6eea4e8c42f227e (diff)
High memory page flipping for the buffer cache.
This change splits the buffer cache free lists into lists of dma reachable buffers and high memory buffers based on the ranges returned by pmemrange. Buffers move from dma to high memory as they age, but are flipped to dma reachable memory if IO is needed to/from and high mem buffer. The total amount of buffers allocated is now bufcachepercent of both the dma and the high memory region. This change allows the use of large buffer caches on amd64 using more than 4 GB of memory ok tedu@ krw@ - testing by many.
Diffstat (limited to 'sys/kern/spec_vnops.c')
-rw-r--r--sys/kern/spec_vnops.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c
index 2bc2e43711b..d2bc271cfb0 100644
--- a/sys/kern/spec_vnops.c
+++ b/sys/kern/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.72 2013/06/11 16:42:16 deraadt Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.73 2013/06/11 19:01:20 beck Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -457,7 +457,9 @@ spec_strategy(void *v)
struct vop_strategy_args *ap = v;
struct buf *bp = ap->a_bp;
int maj = major(bp->b_dev);
-
+
+ if (!ISSET(bp->b_flags, B_DMA) && ISSET(bp->b_flags, B_BC))
+ panic("bogus buf %p passed to spec_strategy", bp);
if (LIST_FIRST(&bp->b_dep) != NULL)
buf_start(bp);