2008-02-08 02:02:23

by NeilBrown

[permalink] [raw]
Subject: Re: Wondering about NLM_HOST_MAX ... doesn't anyone understand this code?

On Thursday February 7, [email protected] wrote:
> Hi Neil-
>
> I don't have a problem with removing the variant expiry behavior --
> in fact, I think it might be better if NLM host garbage collection
> was done only under memory pressure.

Cool, thanks.

> >
> > - if (++nrhosts > NLM_HOST_MAX)
> > - next_gc = 0;
> > -
>
> AFAICT this is the only place where nrhosts is bumped. So you should
> either get rid of nrhosts all together, or leave in a ++nrhosts;
> somewhere.
>

It is still used for a sanity check, and would be needed (I think) if
we introduced a memory-pressure handler, so I'll leave it there and
restore the "++nrhosts" - thanks for catching that.

Thanks,
NeilBrown