From owner-svn-src-head@FreeBSD.ORG Sat Jul 27 21:23:13 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 504D5F9B; Sat, 27 Jul 2013 21:23:13 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id BC5D425BC; Sat, 27 Jul 2013 21:23:12 +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 mail106.syd.optusnet.com.au (Postfix) with ESMTPS id D99963C3137; Sun, 28 Jul 2013 07:22:57 +1000 (EST) Date: Sun, 28 Jul 2013 07:22:56 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Zonov Subject: Re: svn commit: r253662 - in head: lib/libc/gen sys/vm tools/tools/sysdoc In-Reply-To: <51F431F8.1040803@FreeBSD.org> Message-ID: <20130728071405.R3136@besplex.bde.org> References: <201307260200.r6Q207cB015223@svn.freebsd.org> <20130726150949.GC14175@stack.nl> <51F2E970.3070303@FreeBSD.org> <20130727170845.E872@besplex.bde.org> <51F431F8.1040803@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=NRP33-gIz6cA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=csUvqbbglXYA:10 a=0fzaMso3ov0qgOl2MZsA:9 a=0CfFHigASY0qdis4:21 a=4W80fvmnR7tQkGyv:21 a=CjuIK1q_8ugA:10 Cc: src-committers@FreeBSD.org, Jilles Tjoelker , Juli Mallett , svn-src-all@FreeBSD.org, Bruce Evans , svn-src-head@FreeBSD.org 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: Sat, 27 Jul 2013 21:23:13 -0000 On Sat, 27 Jul 2013, Andrey Zonov wrote: > On 7/27/13 12:47 AM, Bruce Evans wrote: >> ... >> Especially since the main reason numbered sysctls exist is to support old >> binaries (and sources) that use them. > > Does it look OK? It looks functionally OK, but ugly. > diff --git a/sys/vm/vm_param.h b/sys/vm/vm_param.h > index 44306be..0323473 100644 > --- a/sys/vm/vm_param.h > +++ b/sys/vm/vm_param.h > @@ -82,8 +82,9 @@ > #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_SWAPPING_ENABLED 10 /* swapping enabled */ > -#define VM_MAXID 11 /* number of valid vm ids */ > +/*#define VM_PAGEOUT_ALGORITHM 10 pageout algorithm */ Commenting out things like this is ugly. Code should be commented out using #if 0, but here I think I prefere changing the #defined name to something like VM_OBS_10. VM_OBS_PAGEOUT_ALGORITGHM would be too long. > +#define VM_SWAPPING_ENABLED 11 /* swapping enabled */ > +#define VM_MAXID 12 /* number of valid vm ids */ > > #define CTL_VM_NAMES { \ > { 0, 0 }, \ > @@ -96,6 +97,7 @@ > { "v_cache_min", CTLTYPE_UINT }, \ > { "v_cache_max", CTLTYPE_UINT }, \ > { "v_pageout_free_min", CTLTYPE_UINT}, \ > + { "obsolete_pageout_algorithm", CTLTYPE_INT}, \ > { "swap_enabled", CTLTYPE_INT},\ > } Bruce