Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm uvm_reclaimable(): need to sum the per-CPU values fo...



details:   https://anonhg.NetBSD.org/src/rev/6f78e7ab0269
branches:  trunk
changeset: 967759:6f78e7ab0269
user:      ad <ad%NetBSD.org@localhost>
date:      Sat Dec 21 11:41:18 2019 +0000

description:
uvm_reclaimable(): need to sum the per-CPU values for filepages/execpages.

diffstat:

 sys/uvm/uvm_pdaemon.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 7351050319ea -r 6f78e7ab0269 sys/uvm/uvm_pdaemon.c
--- a/sys/uvm/uvm_pdaemon.c     Sat Dec 21 11:35:25 2019 +0000
+++ b/sys/uvm/uvm_pdaemon.c     Sat Dec 21 11:41:18 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_pdaemon.c,v 1.115 2019/12/14 21:36:00 ad Exp $     */
+/*     $NetBSD: uvm_pdaemon.c,v 1.116 2019/12/21 11:41:18 ad Exp $     */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.115 2019/12/14 21:36:00 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pdaemon.c,v 1.116 2019/12/21 11:41:18 ad Exp $");
 
 #include "opt_uvmhist.h"
 #include "opt_readahead.h"
@@ -1002,7 +1002,9 @@
         * XXX ie. pools, traditional buffer cache.
         */
 
-       filepages = uvmexp.filepages + uvmexp.execpages - uvmexp.wired;
+       cpu_count_sync_all();
+       filepages = (int)cpu_count_get(CPU_COUNT_FILEPAGES) +
+           (int)cpu_count_get(CPU_COUNT_EXECPAGES) - uvmexp.wired;
        uvm_estimatepageable(&active, &inactive);
        if (filepages >= MIN((active + inactive) >> 4,
            5 * 1024 * 1024 >> PAGE_SHIFT)) {



Home | Main Index | Thread Index | Old Index