Source-Changes-HG archive

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

[src/trunk]: src/sys/ufs/lfs use bufmem instead of bufpages to make lfs a lit...



details:   https://anonhg.NetBSD.org/src/rev/14410dad3312
branches:  trunk
changeset: 558081:14410dad3312
user:      yamt <yamt%NetBSD.org@localhost>
date:      Wed Jan 28 10:54:23 2004 +0000

description:
use bufmem instead of bufpages to make lfs a little less broken.

diffstat:

 sys/ufs/lfs/lfs.h        |   8 ++++----
 sys/ufs/lfs/lfs_bio.c    |  14 +++++++-------
 sys/ufs/lfs/lfs_vfsops.c |   6 +++---
 3 files changed, 14 insertions(+), 14 deletions(-)

diffs (92 lines):

diff -r 8640fa2b9640 -r 14410dad3312 sys/ufs/lfs/lfs.h
--- a/sys/ufs/lfs/lfs.h Wed Jan 28 10:53:12 2004 +0000
+++ b/sys/ufs/lfs/lfs.h Wed Jan 28 10:54:23 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs.h,v 1.70 2003/09/07 11:53:57 yamt Exp $    */
+/*     $NetBSD: lfs.h,v 1.71 2004/01/28 10:54:23 yamt Exp $    */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -111,9 +111,9 @@
 /* Resource limits */
 #define LFS_MAX_BUFS       ((nbuf >> 2) - 10)
 #define LFS_WAIT_BUFS      ((nbuf >> 1) - (nbuf >> 3) - 10)
-#define LFS_MAX_BYTES      (((bufpages >> 2) - 10) * PAGE_SIZE)
-#define LFS_WAIT_BYTES     (((bufpages >> 1) - (bufpages >> 3) - 10) \
-                             * PAGE_SIZE)
+extern u_long bufmem; /* XXX */
+#define LFS_MAX_BYTES      ((bufmem >> 2) - 10 * PAGE_SIZE)
+#define LFS_WAIT_BYTES     ((bufmem >> 1) - (bufmem >> 3) - 10 * PAGE_SIZE)
 #define LFS_MAX_DIROP      ((desiredvnodes >> 2) + (desiredvnodes >> 3))
 #define LFS_MAX_PAGES \
      (((uvmexp.active + uvmexp.inactive + uvmexp.free) * uvmexp.filemin) >> 8)
diff -r 8640fa2b9640 -r 14410dad3312 sys/ufs/lfs/lfs_bio.c
--- a/sys/ufs/lfs/lfs_bio.c     Wed Jan 28 10:53:12 2004 +0000
+++ b/sys/ufs/lfs/lfs_bio.c     Wed Jan 28 10:54:23 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_bio.c,v 1.76 2003/12/04 14:57:47 yamt Exp $        */
+/*     $NetBSD: lfs_bio.c,v 1.77 2004/01/28 10:54:23 yamt Exp $        */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.76 2003/12/04 14:57:47 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.77 2004/01/28 10:54:23 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -141,7 +141,7 @@
                        n, LFS_WAIT_BUFS);
        }
        if (!bytes_fit) {
-               printf("lfs_fits_buf: no fit bytes: %ld + %ld + %d >= %d\n",
+               printf("lfs_fits_buf: no fit bytes: %ld + %ld + %d >= %ld\n",
                        locked_queue_bytes, locked_queue_rbytes,
                        bytes, LFS_WAIT_BYTES);
        }
@@ -600,11 +600,11 @@
 
 #ifdef DEBUG_LFS_FLUSH
        if (locked_queue_count + INOCOUNT(fs) > LFS_MAX_BUFS)
-               printf("lqc = %d, max %d\n", locked_queue_count + INOCOUNT(fs),
-                       LFS_MAX_BUFS);
+               printf("lqc = %d, max %d\n",
+                   locked_queue_count + INOCOUNT(fs), LFS_MAX_BUFS);
        if (locked_queue_bytes + INOBYTES(fs) > LFS_MAX_BYTES)
-               printf("lqb = %ld, max %d\n", locked_queue_bytes + INOBYTES(fs),
-                       LFS_MAX_BYTES);
+               printf("lqb = %ld, max %ld\n",
+                   locked_queue_bytes + INOBYTES(fs), LFS_MAX_BYTES);
        if (lfs_subsys_pages > LFS_MAX_PAGES)
                printf("lssp = %d, max %d\n", lfs_subsys_pages, LFS_MAX_PAGES);
        if (lfs_dirvcount > LFS_MAX_DIROP)
diff -r 8640fa2b9640 -r 14410dad3312 sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c  Wed Jan 28 10:53:12 2004 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c  Wed Jan 28 10:54:23 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_vfsops.c,v 1.141 2003/12/04 19:38:25 atatat Exp $  */
+/*     $NetBSD: lfs_vfsops.c,v 1.142 2004/01/28 10:54:23 yamt Exp $    */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.141 2003/12/04 19:38:25 atatat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.142 2004/01/28 10:54:23 yamt Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -230,7 +230,7 @@
                                printf("daemon: lqc = %d, max %d\n",
                                        locked_queue_count, LFS_MAX_BUFS);
                        if (locked_queue_bytes > LFS_MAX_BYTES)
-                               printf("daemon: lqb = %ld, max %d\n",
+                               printf("daemon: lqb = %ld, max %ld\n",
                                        locked_queue_bytes, LFS_MAX_BYTES);
                        if (lfs_subsys_pages > LFS_MAX_PAGES) 
                                printf("daemon: lssp = %d, max %d\n",



Home | Main Index | Thread Index | Old Index