diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2017-04-17 17:34:47 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2017-04-17 17:34:47 +0000 |
commit | 83c9dea1bac40c7c7cbde4ccb3d747134311ab5a (patch) | |
tree | 7679e220e254a60031cd36e1421cb9c844a72521 /sys/vm/vm_page.c | |
parent | 21d5d37ba4c0131d6c141695366e266e32cc3bc1 (diff) | |
download | src-83c9dea1bac40c7c7cbde4ccb3d747134311ab5a.tar.gz src-83c9dea1bac40c7c7cbde4ccb3d747134311ab5a.zip |
- Remove 'struct vmmeter' from 'struct pcpu', leaving only global vmmeter
in place. To do per-cpu stats, convert all fields that previously were
maintained in the vmmeters that sit in pcpus to counter(9).
- Since some vmmeter stats may be touched at very early stages of boot,
before we have set up UMA and we can do counter_u64_alloc(), provide an
early counter mechanism:
o Leave one spare uint64_t in struct pcpu, named pc_early_dummy_counter.
o Point counter(9) fields of vmmeter to pcpu[0].pc_early_dummy_counter,
so that at early stages of boot, before counters are allocated we already
point to a counter that can be safely written to.
o For sparc64 that required a whole dummy pcpu[MAXCPU] array.
Further related changes:
- Don't include vmmeter.h into pcpu.h.
- vm.stats.vm.v_swappgsout and vm.stats.vm.v_swappgsin changed to 64-bit,
to match kernel representation.
- struct vmmeter hidden under _KERNEL, and only vmstat(1) is an exclusion.
This is based on benno@'s 4-year old patch:
https://lists.freebsd.org/pipermail/freebsd-arch/2013-July/014471.html
Reviewed by: kib, gallatin, marius, lidl
Differential Revision: https://reviews.freebsd.org/D10156
Notes
Notes:
svn path=/head/; revision=317061
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r-- | sys/vm/vm_page.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 5aeefbf1c09a..e6befe15b915 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -2748,7 +2748,7 @@ vm_page_free_toq(vm_page_t m) } else KASSERT(m->queue == PQ_NONE, ("vm_page_free_toq: unmanaged page %p is queued", m)); - PCPU_INC(cnt.v_tfree); + VM_CNT_INC(v_tfree); if (vm_page_sbusied(m)) panic("vm_page_free: freeing busy page %p", m); |