tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: NCHNAMLEN vnode cache limitation removal
> On Sep 11, 2019, at 11:53 AM, Robert Elz <kre%munnari.OZ.AU@localhost> wrote:
>
> Date: Wed, 11 Sep 2019 09:43:18 +0300
> From: Jason Thorpe <thorpej%me.com@localhost>
> Message-ID: <F435B615-E3E4-4ADF-B2AC-854A5C99D5E8%me.com@localhost>
>
> | Another advantage of de-duping the name strings is that you can
> | compare names by testing pointer equivalence.
>
> That works only if string you're comparing against the cache entry
> is itself a cache entry, which would mean a whole new data struct
> to make lookup of those strings fast (as it is now, comparisons get
> a pointer to the string in the cache, and simply compare it with the
> lookup string .. only insert (which is relatively rare) would need to
> search the string cache to see if a name is already there, so that can
> use a slow algorithm, with no extra data struct to manage.
True, you'd have to "create a de-dup'd string" to compare it to other de-dup'd strings using the pointer-equivalence method. There's probably a string length threshold where that makes sense to do, and below that where it doesn't.
-- thorpej
Home |
Main Index |
Thread Index |
Old Index