Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Aug 2012 11:19:56 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Sergey Kandaurov <pluknet@freebsd.org>
Cc:        OriS <site.freebsd@orientalsensation.com>, freebsd-stable@freebsd.org
Subject:   Re: Weird message in dmesg
Message-ID:  <86harozo77.fsf@ds4.des.no>
In-Reply-To: <CAE-mSOJWWELwi=gduOOrwfGUrmox1sy8PSm=CXgZ45xLNu78cA@mail.gmail.com> (Sergey Kandaurov's message of "Mon, 27 Aug 2012 12:26:49 %2B0400")
References:  <CALazp%2BVajMK8FgqJSr5KRB3y2bpH=ZxL2PNLCqPrKD34LM%2BVqw@mail.gmail.com> <CAE-mSOJWWELwi=gduOOrwfGUrmox1sy8PSm=CXgZ45xLNu78cA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Sergey Kandaurov <pluknet@freebsd.org> writes:
> Index: /usr/src/sys/vm/swap_pager.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- /usr/src/sys/vm/swap_pager.c        (revision 239722)
> +++ /usr/src/sys/vm/swap_pager.c        (working copy)
> @@ -2135,7 +2135,7 @@ swapon_check_swzone(unsigned long npages)
>         if (npages > maxpages / 2) {
>                 printf("warning: total configured swap (%lu pages) "
>                     "exceeds maximum recommended amount (%lu pages).\n",
> -                   npages, maxpages);
> +                   npages, maxpages / 2);
>                 printf("warning: increase kern.maxswzone "
>                     "or reduce amount of swap.\n");
>                 return (-1);

Correct.  The theoretical maximum is maxpages, but due to fragmentation,
you can run out of space well before that.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



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