Re: [PATCH] perf: Improve startup time by reducing unnecessary stat() calls

From: Krzysztof Łopatowski
Date: Thu Feb 06 2025 - 16:45:25 EST


Hi Ian,
Thank you for taking the time to look into this.

> I did a series and a new io_dir set of primitives.
> The last version of which is:
> https://lore.kernel.org/lkml/20231207050433.1426834-1-irogers@xxxxxxxxxx/
> I mention this as I think that series may be a better route than this
> change as it solves a little bit more of the performance issue.

I'd much prefer to have your solution merged, as it covers more instances
of the same directory exploration pattern and provides an explicit
approach to memory allocation.

> I stopped pursuing the series as the maintainers were complaining
> about unpopular libcs/platforms missing system call definitions
> (getdents) and the series breaking on those platforms.

Yeah, I agree. I also don't think doing an #undef because of muslc is a
good approach. Would you and Namhyung be open to bypassing libc and
calling SYS_getdents64 directly instead?

Best,
Krzysztof