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

From: Namhyung Kim
Date: Tue Feb 11 2025 - 21:10:53 EST


Hello,

On Thu, Feb 06, 2025 at 10:45:02PM +0100, Krzysztof Łopatowski wrote:
> 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?

Yep, I'm ok with that.

Thanks,
Namhyung