From owner-svn-src-head@FreeBSD.ORG Fri Jul 26 07:57:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BAA491F7; Fri, 26 Jul 2013 07:57:10 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 7C70E2AE4; Fri, 26 Jul 2013 07:57:10 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 883A210415EB; Fri, 26 Jul 2013 17:57:04 +1000 (EST) Date: Fri, 26 Jul 2013 17:57:03 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alan Cox Subject: Re: svn commit: r253587 - head/sys/vm In-Reply-To: Message-ID: <20130726171745.S903@besplex.bde.org> References: <201307240125.r6O1PuQG043670@svn.freebsd.org> <51F1A97A.8050405@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.1 cv=Yos2GeoX c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=k2_y77qti6sA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=AptvzqaXglMA:10 a=6I5d2MoRAAAA:8 a=ICkzG_RQmSd3FELimVYA:9 a=zc2sE1R14Q2WUreY:21 a=rZYTZnQeQprp-bAz:21 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Andrey Zonov , src-committers@freebsd.org, Jeff Roberson X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 26 Jul 2013 07:57:10 -0000 On Thu, 25 Jul 2013, Alan Cox wrote: > On Jul 25, 2013, at 3:40 PM, Andrey Zonov wrote: > >> On 7/23/13 6:25 PM, Jeff Roberson wrote: >>> Author: jeff >>> Date: Wed Jul 24 01:25:56 2013 >>> New Revision: 253587 >>> URL: http://svnweb.freebsd.org/changeset/base/253587 >>> >>> Log: >>> - Remove the long obsolete 'vm_pageout_algorithm' experiment. >> >> There is more of it. What a nuisance for something to be documented :-). > Thank you. Please commit this. Erm, this breaks the ABI, not only for the removed sysctl but for the one that was moved up into its slot number. >> diff --git a/sys/vm/vm_param.h b/sys/vm/vm_param.h >> index c404989..44306be 100644 >> --- a/sys/vm/vm_param.h >> +++ b/sys/vm/vm_param.h >> @@ -82,9 +82,8 @@ >> #define VM_V_CACHE_MIN 7 /* cnt.v_cache_min */ >> #define VM_V_CACHE_MAX 8 /* cnt.v_cache_max */ >> #define VM_V_PAGEOUT_FREE_MIN 9 /* cnt.v_pageout_free_min */ >> -#define VM_PAGEOUT_ALGORITHM 10 /* pageout algorithm */ >> -#define VM_SWAPPING_ENABLED 11 /* swapping enabled */ >> -#define VM_MAXID 12 /* number of valid vm ids */ >> +#define VM_SWAPPING_ENABLED 10 /* swapping enabled */ >> +#define VM_MAXID 11 /* number of valid vm ids */ The ABI requires slot numbers for a discontinued sysctl to reserved for the same discontinued sysctl forever, so that the much later use of the slot doesn't conflict. This is easy to do for sysctls (unlike for syscalls), since numbered sysctls were a design error so new ones and any later reuse of slot numbers are bugs. The ABI prevents fixing the design error. Closing up the gap gives conflicts immediately for all numbered sysctls after the discontinued one. >> >> #define CTL_VM_NAMES { \ >> { 0, 0 }, \ >> @@ -97,7 +96,6 @@ >> { "v_cache_min", CTLTYPE_UINT }, \ >> { "v_cache_max", CTLTYPE_UINT }, \ >> { "v_pageout_free_min", CTLTYPE_UINT}, \ >> - { "pageout_algorithm", CTLTYPE_INT}, \ >> { "swap_enabled", CTLTYPE_INT},\ >> } CTL_*NAMES is garbage, but if it were used, then its slot numbers would need to be preserved forever too, and its strings for discontinued sysctls should never be removed, so that things like kdump can decode discontinued sysctls. The string list for syscalls supports most discontinued syscalls starting with #11 = obsolete execv = "obs_execv". CTL_*NAMES was actually only used be sysctl(8). It became garbage on 21 Dec 1995. Bruce