Date: Tue, 18 Apr 2017 13:58:35 -0600 From: Alan Somers <asomers@freebsd.org> To: Gleb Smirnoff <glebius@freebsd.org> Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r317061 - in head: libexec/rpc.rstatd sys/amd64/amd64 sys/amd64/include sys/arm/arm sys/arm/include sys/arm64/include sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/compat/linprocfs... Message-ID: <CAOtMX2jdNj0du0ZuUKPr16iHK_YeNVzf-nDvwC-MuFM003VVAg@mail.gmail.com> In-Reply-To: <201704171734.v3HHYlf5022945@repo.freebsd.org> References: <201704171734.v3HHYlf5022945@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 17, 2017 at 11:34 AM, Gleb Smirnoff <glebius@freebsd.org> wrote: > Author: glebius > Date: Mon Apr 17 17:34:47 2017 > New Revision: 317061 > URL: https://svnweb.freebsd.org/changeset/base/317061 > > Log: > - 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 > > Modified: > head/libexec/rpc.rstatd/rstat_proc.c > head/sys/amd64/amd64/trap.c > head/sys/amd64/include/atomic.h > head/sys/amd64/include/counter.h > head/sys/amd64/include/pcpu.h > head/sys/arm/arm/intr.c > head/sys/arm/arm/trap-v4.c > head/sys/arm/arm/trap-v6.c > head/sys/arm/arm/undefined.c > head/sys/arm/include/counter.h > head/sys/arm/include/pcpu.h > head/sys/arm64/include/counter.h > head/sys/arm64/include/pcpu.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c > head/sys/compat/linprocfs/linprocfs.c > head/sys/fs/fuse/fuse_vnops.c > head/sys/fs/nfsclient/nfs_clbio.c > head/sys/fs/smbfs/smbfs_io.c > head/sys/i386/i386/trap.c > head/sys/i386/include/atomic.h > head/sys/i386/include/counter.h > head/sys/i386/include/pcpu.h > head/sys/kern/kern_fork.c > head/sys/kern/kern_intr.c > head/sys/kern/kern_synch.c > head/sys/kern/kern_thread.c > head/sys/kern/subr_intr.c > head/sys/kern/subr_syscall.c > head/sys/kern/subr_trap.c > head/sys/kern/vfs_bio.c > head/sys/mips/include/counter.h > head/sys/mips/include/intr_machdep.h > head/sys/mips/include/pcpu.h > head/sys/powerpc/include/counter.h > head/sys/powerpc/include/pcpu.h > head/sys/powerpc/powerpc/trap.c > head/sys/sparc64/include/counter.h > head/sys/sparc64/include/pcpu.h > head/sys/sparc64/sparc64/exception.S > head/sys/sparc64/sparc64/genassym.c > head/sys/sparc64/sparc64/intr_machdep.c > head/sys/sparc64/sparc64/machdep.c > head/sys/sparc64/sparc64/trap.c > head/sys/sys/pcpu.h > head/sys/sys/vmmeter.h > head/sys/vm/swap_pager.c > head/sys/vm/vm_fault.c > head/sys/vm/vm_meter.c > head/sys/vm/vm_object.c > head/sys/vm/vm_page.c > head/sys/vm/vm_pageout.c > head/sys/vm/vnode_pager.c > head/sys/x86/acpica/srat.c > head/sys/x86/x86/intr_machdep.c > head/usr.bin/top/machine.c > head/usr.bin/vmstat/vmstat.c This change broke backwards compatibility with old top binaries. When I use a kernel at version 317094 but a top from 14-April, I get the error "top: sysctl(vm.stats.vm.v_swappgsin...) failed: Cannot allocate memory". I get the same error when running top from an 11.0-RELEASE jail. Can you please add backward compatibility shims? -Alan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2jdNj0du0ZuUKPr16iHK_YeNVzf-nDvwC-MuFM003VVAg>