Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jul 2013 07:22:56 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Andrey Zonov <zont@FreeBSD.org>
Cc:        src-committers@FreeBSD.org, Jilles Tjoelker <jilles@stack.nl>, Juli Mallett <jmallett@FreeBSD.org>, svn-src-all@FreeBSD.org, Bruce Evans <brde@optusnet.com.au>, svn-src-head@FreeBSD.org
Subject:   Re: svn commit: r253662 - in head: lib/libc/gen sys/vm tools/tools/sysdoc
Message-ID:  <20130728071405.R3136@besplex.bde.org>
In-Reply-To: <51F431F8.1040803@FreeBSD.org>
References:  <201307260200.r6Q207cB015223@svn.freebsd.org> <20130726150949.GC14175@stack.nl> <51F2E970.3070303@FreeBSD.org> <CACVs6=_gLGtW01-rmxTmaVgMBJWjpFHMEQ2R36Nvf2er7B4v%2Bw@mail.gmail.com> <20130727170845.E872@besplex.bde.org> <51F431F8.1040803@FreeBSD.org>

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



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