Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Nov 2015 20:50:53 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Kirk McKusick <mckusick@mckusick.com>
Cc:        fs@freebsd.org
Subject:   Re: an easy (?) question on namecache sizing
Message-ID:  <20151106185053.GS2257@kib.kiev.ua>
In-Reply-To: <201511052107.tA5L7QBB067460@chez.mckusick.com>
References:  <20151105205255.GL2257@kib.kiev.ua> <201511052107.tA5L7QBB067460@chez.mckusick.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 05, 2015 at 01:07:26PM -0800, Kirk McKusick wrote:
> > Date: Thu, 5 Nov 2015 22:52:55 +0200
> > From: Konstantin Belousov <kostikbel@gmail.com>
> > To: Kirk McKusick <mckusick@mckusick.com>
> > 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 moment
> >> we are not correcting wantfreevnodes at all. Or am I missing some key point?
> > 
> > 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.

With upsizing, if wantfreevnodes are set before desiredvnodes are increased,
you can again get into the contradictory state, where the wantfreevnodes
is larger than desiredvnodes.



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