From owner-svn-src-head@freebsd.org Thu Dec 8 02:07:17 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 C428FC6C862; Thu, 8 Dec 2016 02:07:17 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 8C00C1C4C; Thu, 8 Dec 2016 02:07:17 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id BA4517852FC; Thu, 8 Dec 2016 13:07:08 +1100 (AEDT) Date: Thu, 8 Dec 2016 13:07:06 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: Gleb Smirnoff , Mark Johnston , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r309658 - head/sys/vm In-Reply-To: Message-ID: <20161208123844.B935@besplex.bde.org> References: <201612062252.uB6Mqjhr019191@repo.freebsd.org> <20161207212647.GO27748@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cZeiljLM c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=6Ab79dwixtNJJACnbNEA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 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 02:07:17 -0000 On Wed, 7 Dec 2016, Warner Losh wrote: > On Wed, Dec 7, 2016 at 2:26 PM, 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. > > Other places define #if BURN_BRUDGES < 1200000 to make this automatic. The correct ifdef is something like '#if COMPAT_FREEBSD12' to make this non-automatic. Support for this option should of course be removed some time after the support for COMPAT_43 option. That is only 25-30 years old. FreeBSD never imported the rather large COMPAT_42 support from 4.4BSD-Lite (except for TCP_COMPAT_42) since it never supported the arches that needed it, but it still had 1 COMPAT_42 ifdef in udp_usrreq.c until 2002. That ifdef was garbage since the option was not supported (not in conf/options). It was for a sysctl too, but less needed since it was only for the default value. Bruce