Re: [PATCH v3 2/2] vfs: avoid duplicating creds in faccessat if possible

From: Mateusz Guzik
Date: Thu Mar 02 2023 - 13:52:07 EST


On 3/2/23, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> On Thu, Mar 02, 2023 at 07:22:17PM +0100, Mateusz Guzik wrote:
>
>> Ops, I meant "names_cache", here:
>> names_cachep = kmem_cache_create_usercopy("names_cache", PATH_MAX, 0,
>> SLAB_HWCACHE_ALIGN|SLAB_PANIC, 0, PATH_MAX, NULL);
>>
>> it is fs/dcache.c and I brainfarted into the above.
>
> So you mean __getname() stuff?
>

yes. do some lookups in a loop on a kernel built with
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y (there may be a runtime switch for
it?) and you will see memset using most time in perf top

--
Mateusz Guzik <mjguzik gmail.com>