Re: [PATCH v5 1/2] kernfs: use hashed mutex and spinlock in place of global ones.

From: Tejun Heo
Date: Mon Feb 14 2022 - 12:39:23 EST


Hello,

On Mon, Feb 14, 2022 at 11:19:38PM +1100, Imran Khan wrote:
> > * How did you come up with the above numbers? Are they based on some
> > experimentation? It'd be nice if the comment explains why the numbers are
> > like that.
> >
>
> I did some testing using different number of CPUs with qemu and the
> above numbers were collected from there. It may not be optimum but this
> is what I could think of while doing those internal tests.
>
> Do you think it may be better to make this configurable via Kconfig.

I think it's good as-is for now and it's super easy and cheap to increase
the hashtable size when some cases see a high contention.

Thanks.

--
tejun