Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Counter tweaks:
details: https://anonhg.NetBSD.org/src/rev/a8274b4af027
branches: trunk
changeset: 934420:a8274b4af027
user: ad <ad%NetBSD.org@localhost>
date: Thu Jun 11 22:25:51 2020 +0000
description:
Counter tweaks:
- Don't need to count anonpages+filepages any more; clean+unknown+dirty for
each kind of page can be summed to get the totals.
- Track the number of free pages with a counter so that it's one less thing
for the allocator to do, which opens up further options there.
- Remove cpu_count_sync_one(). It has no users and doesn't save a whole lot.
For the cheap option, give cpu_count_sync() a boolean parameter indicating
that a cached value is okay, and rate limit the updates for cached values
to hz.
diffstat:
sys/uvm/uvm_pglist.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r a52a05b1e7dd -r a8274b4af027 sys/uvm/uvm_pglist.c
--- a/sys/uvm/uvm_pglist.c Thu Jun 11 22:25:44 2020 +0000
+++ b/sys/uvm/uvm_pglist.c Thu Jun 11 22:25:51 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_pglist.c,v 1.83 2020/06/11 19:20:47 ad Exp $ */
+/* $NetBSD: uvm_pglist.c,v 1.84 2020/06/11 22:25:51 ad Exp $ */
/*-
* Copyright (c) 1997, 2019 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.83 2020/06/11 19:20:47 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.84 2020/06/11 22:25:51 ad Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -98,6 +98,7 @@
#endif
LIST_REMOVE(pg, pageq.list);
pgb->pgb_nfree--;
+ CPU_COUNT(CPU_COUNT_FREEPAGES, -1);
if (pg->flags & PG_ZERO)
CPU_COUNT(CPU_COUNT_ZEROPAGES, -1);
pg->flags = PG_CLEAN;
Home |
Main Index |
Thread Index |
Old Index