From owner-freebsd-current@FreeBSD.ORG Wed Mar 20 17:24:14 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A4B14F36 for ; Wed, 20 Mar 2013 17:24:14 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-oa0-f49.google.com (mail-oa0-f49.google.com [209.85.219.49]) by mx1.freebsd.org (Postfix) with ESMTP id 795F8798 for ; Wed, 20 Mar 2013 17:24:14 +0000 (UTC) Received: by mail-oa0-f49.google.com with SMTP id j6so2104744oag.36 for ; Wed, 20 Mar 2013 10:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:date:x-google-sender-auth:message-id :subject:from:to:content-type; bh=fwworPv2m2+MsZosVM7mpTwMNDV4jyxUvzQnw4vdYMY=; b=KxbKCRpWIFHgVQteCqTWIcm7bwykBJ4IoBh09euIItfW3aiH/CyygQy04YctDWt6cc crLup2XUH9PKBBGVgvYwG4DUVClbCFARkX9PXl9SxbuM55q4F9oXUNNsoEBdvrY6UY8g fhAWjQCx4+TJURWao/SXW96twdnJwUXavtvkIO1yw4niT2kKSMZxfTFRwEVVD0JDntS7 7Op1u0eU9fmy//Hz7UpssW2Wp+fi7wPWC+qNqAR6lzUmm/9kuPHGEZsrS3e7inuP0TMT PlbE71RQAvDON7hZd3zIcULaHSMBai0ugohtcKEb2HnIz7ISD4G22yzmDjoYDfj6mnAH LEjw== MIME-Version: 1.0 X-Received: by 10.60.7.67 with SMTP id h3mr4679766oea.69.1363800253771; Wed, 20 Mar 2013 10:24:13 -0700 (PDT) Sender: maksim.yevmenkin@gmail.com Received: by 10.76.108.7 with HTTP; Wed, 20 Mar 2013 10:24:13 -0700 (PDT) Date: Wed, 20 Mar 2013 10:24:13 -0700 X-Google-Sender-Auth: PGVKKAASAyvhY5UlKxHz9s2CAGk Message-ID: Subject: [RFC] small VM patch to review From: Maksim Yevmenkin To: current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Mar 2013 17:24:14 -0000 hello, would anyone object to the following small patch? == Index: vm_pageout.c =================================================================== --- vm_pageout.c (revision 248560) +++ vm_pageout.c (working copy) @@ -882,14 +882,17 @@ vm_pageout_init_marker(&marker, PQ_INACTIVE); - /* - * Decrease registered cache sizes. - */ - EVENTHANDLER_INVOKE(vm_lowmem, 0); - /* - * We do this explicitly after the caches have been drained above. - */ - uma_reclaim(); + if (pass) { + /* + * Decrease registered cache sizes. + */ + EVENTHANDLER_INVOKE(vm_lowmem, 0); + /* + * We do this explicitly after the caches have + * been drained above. + */ + uma_reclaim(); + } /* * The addl_page_shortage is the number of temporarily == the idea is to not invoke lowmem handler etc. on first pass in vm_pageout_scan(). it saves a few CPU cycles on a relatively busy webserver with moderate amount of RAM serving large-ish files. thanks, max