Re: REGRESSION: Performance regressions from switching anon_vma->lockto mutex

From: Andi Kleen
Date: Thu Jun 16 2011 - 16:15:35 EST



/proc/stat may be slow, but it's not slower than doing real work -
unless you call it millions of times.


I haven't analyzed it in detail, but I suspect it's some cache line bounce, which
can slow things down quite a lot. Also the total number of invocations
is quite high (hundreds of messages per core * 32 cores)

Ok even with cache line bouncing it's suspicious.

And you didn't actually look at glibc sources, did you?

I did, but I gave up fully following that code path because it's so convoluted :-/

Ok if you want I can implement caching in the LD_PRELOAD and see
if it changes things.

There is very clearly no caching going on. And since exim doesn't even
execve, it just forks, it's very clear that it could cache things just
ONCE, so your argument that caching wouldn't be possible at that level
is also bogus.

So you mean caching it at startup time? Otherwise the parent would
need to do sysconf() at least , which it doesn't do (the exim source doesn't
really know anything about libdb internals)

That would add /proc/stat overhead to every program execution. Is that what you
are proposing?

-Andi

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/