Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Nov 2012 19:40:00 -0500
From:      Eitan Adler <eadler@freebsd.org>
To:        Alfred Perlstein <alfred@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   Re: svn commit: r242805 - in user/alfred/9-alfred/sys: i386/include kern
Message-ID:  <CAF6rxgkwzddF_E%2BiKG1swzG0deXy9iNPawCYR0cz02RR-JOfzg@mail.gmail.com>
In-Reply-To: <201211082324.qA8NO3h5046824@svn.freebsd.org>
References:  <201211082324.qA8NO3h5046824@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8 November 2012 18:24, Alfred Perlstein <alfred@freebsd.org> wrote:
> Author: alfred
> Date: Thu Nov  8 23:24:02 2012
> New Revision: 242805
> URL: http://svnweb.freebsd.org/changeset/base/242805
>
> Log:
>   clip maxusers based on MD VM_MAX_AUTOTUNE_MAXUSERS.
>
> Modified:
>   user/alfred/9-alfred/sys/i386/include/vmparam.h
>   user/alfred/9-alfred/sys/kern/subr_param.c
>
> Modified: user/alfred/9-alfred/sys/i386/include/vmparam.h
> ==============================================================================
> --- user/alfred/9-alfred/sys/i386/include/vmparam.h     Thu Nov  8 23:21:02 2012        (r242804)
> +++ user/alfred/9-alfred/sys/i386/include/vmparam.h     Thu Nov  8 23:24:02 2012        (r242805)
> @@ -202,9 +202,14 @@
>
>  #define        ZERO_REGION_SIZE        (64 * 1024)     /* 64KB */
>
> +#ifndef VM_MAX_AUTOTUNE_MAXUSERS
> +#define VM_MAX_AUTOTUNE_MAXUSERS 384
> +#endif
> +
>  #ifndef MAX_AUTOTUNE_NMBCLUSTERS
>  /* old maxusers max value. */
>  #define MAX_AUTOTUNE_NMBCLUSTERS (1024 + 384 * 64)
>  #endif
>
> +
>  #endif /* _MACHINE_VMPARAM_H_ */
>
> Modified: user/alfred/9-alfred/sys/kern/subr_param.c
> ==============================================================================
> --- user/alfred/9-alfred/sys/kern/subr_param.c  Thu Nov  8 23:21:02 2012        (r242804)
> +++ user/alfred/9-alfred/sys/kern/subr_param.c  Thu Nov  8 23:24:02 2012        (r242805)
> @@ -278,16 +278,16 @@ init_param2(long physpages)
>                 maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE);
>                 if (maxusers < 32)
>                         maxusers = 32;
> +#ifdef VM_MAX_AUTOTUNE_MAXUSERS
> +               if (maxusers > VM_MAX_AUTOTUNE_MAXUSERS)
> +                       maxusers = VM_MAX_AUTOTUNE_MAXUSERS;
> +#endif
>                 /*
> -                * Clips maxusers to 384 on machines with <= 4GB RAM or 32bit.
> -                * Scales it down 6x for large memory machines.
> +                * Scales down the function in which maxusers grows once
> +                * we hit 384
>                  */

Could the number 384 be clarified here. Where is it coming from?




-- 
Eitan Adler
Source, Ports, Doc committer
Bugmeister, Ports Security teams



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxgkwzddF_E%2BiKG1swzG0deXy9iNPawCYR0cz02RR-JOfzg>