From owner-freebsd-fs@freebsd.org Thu Nov 5 21:07:28 2015 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F811A27215 for ; Thu, 5 Nov 2015 21:07:28 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 3B6B51BCC for ; Thu, 5 Nov 2015 21:07:28 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: by mailman.ysv.freebsd.org (Postfix) id 37917A27214; Thu, 5 Nov 2015 21:07:28 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37223A27213 for ; Thu, 5 Nov 2015 21:07:28 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [IPv6:2001:5a8:4:7e72:d250:99ff:fe57:4030]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 198841BCA for ; Thu, 5 Nov 2015 21:07:28 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (localhost [IPv6:::1]) by chez.mckusick.com (8.15.2/8.14.9) with ESMTP id tA5L7QBB067460; Thu, 5 Nov 2015 13:07:26 -0800 (PST) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201511052107.tA5L7QBB067460@chez.mckusick.com> From: Kirk McKusick To: Konstantin Belousov Subject: Re: an easy (?) question on namecache sizing cc: fs@freebsd.org In-reply-to: <20151105205255.GL2257@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <67458.1446757646.1@chez.mckusick.com> Content-Transfer-Encoding: quoted-printable Date: Thu, 05 Nov 2015 13:07:26 -0800 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 21:07:28 -0000 > Date: Thu, 5 Nov 2015 22:52:55 +0200 > From: Konstantin Belousov > To: Kirk McKusick > Subject: Re: an easy (?) question on namecache sizing > Cc: fs@freebsd.org > = > On Thu, Nov 05, 2015 at 12:25:38PM -0800, Kirk McKusick wrote: >> = >> Does moving the setting of wantfreevnodes before the cache size changes >> (as redone above) close the window enough? The vlrureclaim() function >> operates slowly enough that a brief period of inconsistency seems >> unimportant. Changing desiredvnodes happens very rarely. And at the mom= ent >> we are not correcting wantfreevnodes at all. Or am I missing some key p= oint? > = > I think wantfreevnodes should be set before the cache size changes when > desiredvnodes is decreased, but kept at the place in your patch for the > increasing case. What is the benefit of waiting until after the caches are resized for setting wantfreevnodes when desiredvnodes is increasing? It seems like it just complicates the code to conditionally do the update in two places, so I am inclined to just do it at the beginning as there is good reason for doing it there when downsizing and for the upsizing it does not really matter much. Kirk McKusick