From owner-freebsd-current@FreeBSD.ORG Wed May 23 18:15:52 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 102C31065673 for ; Wed, 23 May 2012 18:15:52 +0000 (UTC) (envelope-from alan.l.cox@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id D6CC58FC1B for ; Wed, 23 May 2012 18:15:51 +0000 (UTC) Received: by dadv36 with SMTP id v36so10926180dad.13 for ; Wed, 23 May 2012 11:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=tH9InLBQ4WC/46L0ziCrBQSKdkk1/FunFoy/UKE2d2w=; b=OIaypd2X2st9JhXYnrZrGOjzmzjppMbZrYcPoIEDcX4/r0MBeDnwQAYZ2MsSCp/BvE f1IPIAGfXHb5l6iZd7XPWQ5kMDsHrzx0cx47B7IFTJRf2RmOmCeoY3lcUxlMivL/5Gm+ B8cHiScxkLWiwDaagOTZSc9IdNGyLRcMQX+hB/RTceEK/tNlhgKW1Fl1sJkjj/uJ6rXP L6n3xTygQIAyBq+7TV7RxdY4tDmAERgO0n6Oguc70NgLOjvnzVri7qF66XdO9RMlyMZ7 Sur2ra9pgSUj0FIfHJXcuwrBnSd3aOdKApZ3Jux1GYuQVglrrnDu201LJIAKzYveaxGK HU2A== MIME-Version: 1.0 Received: by 10.68.231.195 with SMTP id ti3mr12613039pbc.96.1337796951652; Wed, 23 May 2012 11:15:51 -0700 (PDT) Received: by 10.68.226.7 with HTTP; Wed, 23 May 2012 11:15:51 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 May 2012 13:15:51 -0500 Message-ID: From: Alan Cox To: Maksim Yevmenkin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: current@freebsd.org Subject: Re: RFC: [PATCH] disabling buckets under "low memory" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: alc@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2012 18:15:52 -0000 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 >