From owner-svn-src-head@freebsd.org Thu Dec 8 15:54:47 2016 Return-Path: Delivered-To: svn-src-head@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 56A2DC6DBD7; Thu, 8 Dec 2016 15:54:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3596C1BB7; Thu, 8 Dec 2016 15:54:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id EB91110A758; Thu, 8 Dec 2016 10:54:45 -0500 (EST) From: John Baldwin To: Mark Johnston Cc: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r309658 - head/sys/vm Date: Thu, 08 Dec 2016 07:50:17 -0800 Message-ID: <1613947.95yg9mLP0R@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20161207221548.GA33409@wkstn-mjohnston> References: <201612062252.uB6Mqjhr019191@repo.freebsd.org> <20161207212647.GO27748@FreeBSD.org> <20161207221548.GA33409@wkstn-mjohnston> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 08 Dec 2016 10:54:46 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2016 15:54:47 -0000 On Wednesday, December 07, 2016 02:15:49 PM Mark Johnston wrote: > On Wed, Dec 07, 2016 at 01:26:47PM -0800, Gleb Smirnoff wrote: > > On Tue, Dec 06, 2016 at 10:52:45PM +0000, Mark Johnston wrote: > > M> Author: markj > > M> Date: Tue Dec 6 22:52:45 2016 > > M> New Revision: 309658 > > M> URL: https://svnweb.freebsd.org/changeset/base/309658 > > M> > > M> Log: > > M> Provide dummy sysctls for v_cache_count and v_tcached. > > M> > > M> Some utilities (notably top(1)) exit if any of their input sysctls don't > > M> exist, and the removal of the above-mentioned PG_CACHE-related sysctls > > M> makes it difficult to run such utilities on different versions of the > > M> kernel without recompiling. > > M> > > M> Requested by: bde > > M> > > M> Modified: > > M> head/sys/vm/vm_meter.c > > M> > > M> Modified: head/sys/vm/vm_meter.c > > M> ============================================================================== > > M> --- head/sys/vm/vm_meter.c Tue Dec 6 22:48:28 2016 (r309657) > > M> +++ head/sys/vm/vm_meter.c Tue Dec 6 22:52:45 2016 (r309658) > > M> @@ -314,3 +314,14 @@ VM_STATS_VM(v_forkpages, "VM pages affec > > M> VM_STATS_VM(v_vforkpages, "VM pages affected by vfork()"); > > M> VM_STATS_VM(v_rforkpages, "VM pages affected by rfork()"); > > M> VM_STATS_VM(v_kthreadpages, "VM pages affected by fork() by kernel"); > > M> + > > M> +#ifndef BURN_BRIDGES > > M> +/* > > M> + * Provide compatibility sysctls for the benefit of old utilities which exit > > M> + * with an error if they cannot be found. > > M> + */ > > M> +SYSCTL_UINT(_vm_stats_vm, OID_AUTO, v_cache_count, CTLFLAG_RD, > > M> + (u_int *)NULL, 0, "Dummy for compatibility"); > > M> +SYSCTL_UINT(_vm_stats_vm, OID_AUTO, v_tcached, CTLFLAG_RD, > > M> + (u_int *)NULL, 0, "Dummy for compatibility"); > > M> +#endif > > > > IMHO, there should be some garbage collecting timeout for them. I'd suggest to > > delete them from head after stable/12 branch is forked. > > The intent was to improve compatibility with old userlands, not just to > help bridge the transition from 11.0 to 12.0. In general I'm all for > removing cruft, but these sysctls are unobtrusive and I don't see any > reason to remove them in a specific time frame provided that nothing > else breaks compatibility for top(1) (and vmstat(8)). Please feel free > to add a timeout if you still disagree, though. I would suggest sticking them under COMPAT_FREEBSD11 then. That would give users control via the COMPAT_FREEBSD options the way we do with other compat shims. The only nit is you need to add the COMPAT_FREEBSD11 option first (probably in a separate commit). -- John Baldwin