Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jul 2013 17:57:03 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Alan Cox <alc@rice.edu>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, Andrey Zonov <zont@freebsd.org>, src-committers@freebsd.org, Jeff Roberson <jeff@freebsd.org>
Subject:   Re: svn commit: r253587 - head/sys/vm
Message-ID:  <20130726171745.S903@besplex.bde.org>
In-Reply-To: <B93112B1-C289-4B83-9FF7-C10409BCF8DD@rice.edu>
References:  <201307240125.r6O1PuQG043670@svn.freebsd.org> <51F1A97A.8050405@FreeBSD.org> <B93112B1-C289-4B83-9FF7-C10409BCF8DD@rice.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130726171745.S903>