Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern use a dedicated buf pool for getiobuf.



details:   https://anonhg.NetBSD.org/src/rev/9c229d0e384d
branches:  trunk
changeset: 586928:9c229d0e384d
user:      yamt <yamt%NetBSD.org@localhost>
date:      Thu Jan 05 10:18:20 2006 +0000

description:
use a dedicated buf pool for getiobuf.

diffstat:

 sys/kern/vfs_bio.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (46 lines):

diff -r 5734df183f6b -r 9c229d0e384d sys/kern/vfs_bio.c
--- a/sys/kern/vfs_bio.c        Thu Jan 05 05:02:33 2006 +0000
+++ b/sys/kern/vfs_bio.c        Thu Jan 05 10:18:20 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_bio.c,v 1.149 2006/01/04 10:13:05 yamt Exp $       */
+/*     $NetBSD: vfs_bio.c,v 1.150 2006/01/05 10:18:20 yamt Exp $       */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -81,7 +81,7 @@
 #include "opt_softdep.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.149 2006/01/04 10:13:05 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.150 2006/01/05 10:18:20 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1733,6 +1733,10 @@
 }
 #endif /* DEBUG */
 
+/* ------------------------------ */
+
+POOL_INIT(bufiopool, sizeof(struct buf), 0, 0, 0, "biopl", NULL);
+
 static struct buf *
 getiobuf1(int prflags)
 {
@@ -1740,7 +1744,7 @@
        int s;
 
        s = splbio();
-       bp = pool_get(&bufpool, prflags);
+       bp = pool_get(&bufiopool, prflags);
        splx(s);
        if (bp != NULL) {
                BUF_INIT(bp);
@@ -1768,6 +1772,6 @@
        int s;
 
        s = splbio();
-       pool_put(&bufpool, bp);
+       pool_put(&bufiopool, bp);
        splx(s);
 }



Home | Main Index | Thread Index | Old Index