From owner-svn-src-all@freebsd.org Tue Apr 18 19:58:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31013D44C89; Tue, 18 Apr 2017 19:58:37 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yb0-x233.google.com (mail-yb0-x233.google.com [IPv6:2607:f8b0:4002:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E2A1A1FB4; Tue, 18 Apr 2017 19:58:36 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yb0-x233.google.com with SMTP id s22so898552ybe.3; Tue, 18 Apr 2017 12:58:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=lpknUgpP3l6FQMxhyRaZMtujjwHEuPDoItk497Exv9c=; b=aFD6fEWYs50J05Pr+z6V0sm3nsS93zfx0Y/s9BAcEU+rmLrgETpgvs9+lhjrZxVfgz poadnFbLs7GOKCiFttzCJbjm0pccGhj9KlQY6QED3ittdR+tOi+F0B11S3q74n4eTBGf uEfkARO12f7uJMHHWp6t5M0MIOiCq+ViccseJk2HXQuTF7wyS1u5QufnXDfvhuLgbNdZ GvnbWUfgi53RvtuKiew1D5/frlBtkrMZXKwox9bj+082Ki10nQY6FkHhlHcNTSAKfFnR A54SJhukpLKEk10ivLD54kaqagsX61iFP4WGr8BinRYqvNR58L6e09gmmYDZh6OlX6Fw Z3AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=lpknUgpP3l6FQMxhyRaZMtujjwHEuPDoItk497Exv9c=; b=jli8d+IwsPm2QAtNNlT9ssWnioIy2xLho+F5AMUpH+oge7vCyk8bU9bMtFlEsTH2kH z1gT+AIuoH6VkEfH17QBXrfJaY84yRKwXGYZLyM4bC9SOekoPSW99W3UAbRVQfLnFL4k RdLHxmCzYI7tB6iJr1c6Fdlw78d89jeo/wEC4bZiInCrlhP8o+nFjkj65UzjqgzNPCfO gf/kEJNZl+ld8vz9YRECsCEbNjV2pAdI+21jbyRvK22afVh6Gt5E38XfN9KgedtLxAEG Oy7JTiZr+y+FTicUrlTGQGRyOvC9jqC78K65ErpviexAmztDVa4vuv6+mR1MYMCyouix 31lA== X-Gm-Message-State: AN3rC/5j9UVi9vz6lmZ4QOYhyZOSUHGlxW//bGJfDcbMTPnX2Avv2oPT Q7AAQvJSoGdxUvi66kXJvD8edz6KXg== X-Received: by 10.37.234.72 with SMTP id o8mr20128670ybe.34.1492545515777; Tue, 18 Apr 2017 12:58:35 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.129.20.214 with HTTP; Tue, 18 Apr 2017 12:58:35 -0700 (PDT) In-Reply-To: <201704171734.v3HHYlf5022945@repo.freebsd.org> References: <201704171734.v3HHYlf5022945@repo.freebsd.org> From: Alan Somers Date: Tue, 18 Apr 2017 13:58:35 -0600 X-Google-Sender-Auth: Lx3jDKG8zQPwIAM5U5c8b-EjZvM Message-ID: 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... To: Gleb Smirnoff Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2017 19:58:37 -0000 On Mon, Apr 17, 2017 at 11:34 AM, Gleb Smirnoff 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