Re: [PATCH] kprobes - do not allow optimized kprobes in entry code

From: Ingo Molnar
Date: Sun Feb 20 2011 - 08:00:13 EST



* Masami Hiramatsu <masami.hiramatsu.pt@xxxxxxxxxxx> wrote:

> Thanks, I've also tested. (But my machine has no L1-icache-prefetches* support)
> What I can tell is both of L1-icache-load and L1-icache-load-misses is reduced by
> the patch. ;-)

That's actually a pretty interesting result: it means that compressing entry code
into a single section compresses the icache footprint in a measurable way. The
icache miss rate went down by about 6%:

> 1,234,272 L1-icache-load-misses ( +- 0.105% )
> 1,155,816 L1-icache-load-misses ( +- 0.113% )

Which, assuming that there's no kernel build and bootup related skew effect that is
larger than 2-3% means that this is an improvement.

perf feature request: would be nice if it was able to do:

perf stat --record ...
perf diff

and it would show a comparison of the two runs.

In hindsight it makes sense: the patch probably reduced the fragmentation of the
icache for this workload.

But it's still surprising :-)

Mind splitting the patch up into two parts, the first one that does the performance
optimization intentionally (with numbers, explanation, etc.), the second one that
uses the new section for kprobes exclusion?

Thanks,

Ingo
--
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/