Date: Wed, 23 May 2012 13:15:51 -0500 From: Alan Cox <alan.l.cox@gmail.com> To: Maksim Yevmenkin <maksim.yevmenkin@gmail.com> Cc: current@freebsd.org Subject: Re: RFC: [PATCH] disabling buckets under "low memory" Message-ID: <CAJUyCcMKsf9dK1uXqo7n6Lr3ETtVB2%2BL0=FhZ323ow9BnXYVzQ@mail.gmail.com> In-Reply-To: <CAFPOs6qihXPA_N7CbYHa=U_PMcKPazXEQy7c9xygUpVWmPzx1g@mail.gmail.com> References: <CAFPOs6qihXPA_N7CbYHa=U_PMcKPazXEQy7c9xygUpVWmPzx1g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 23, 2012 at 1:05 PM, Maksim Yevmenkin <
maksim.yevmenkin@gmail.com> wrote:
> hello,
>
> would anyone object to the following patch?
>
>
No objection.  There shouldn't be any controversy here.  Your patch is
correct.  The existing code in UMA is doing the wrong comparison.
Alan
> ===
>
> Index: uma_core.c
> ===================================================================
> --- uma_core.c  (revision 616)
> +++ uma_core.c  (working copy)
> @@ -267,10 +267,7 @@
>  static void
>  bucket_enable(void)
>  {
> -       if (cnt.v_free_count < cnt.v_free_min)
> -               bucketdisable = 1;
> -       else
> -               bucketdisable = 0;
> +       bucketdisable = vm_page_count_min();
>  }
>
> ===
>
> i've observed situation where per-cpu buckets were disabled while
> there were enough free cached pages. basically, cnt.v_free_count was
> sitting stable at a value lower than cnt.v_free_min and that caused
> massive performance drop. tuning down vm.v_free_min sysctl immediately
> helped.
>
> thanks,
> max
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJUyCcMKsf9dK1uXqo7n6Lr3ETtVB2%2BL0=FhZ323ow9BnXYVzQ>
