Re: [tip:perfcounters/core] perf_counter: x86: Fix call-chain supportto use NMI-safe methods

From: Linus Torvalds
Date: Mon Jun 15 2009 - 19:24:48 EST




On Mon, 15 Jun 2009, Ingo Molnar wrote:
>
> See the numbers in the other mail: about 33 million pagefaults
> happen in a typical kernel build - that's ~400K/sec - and that is
> not a particularly really pagefault-heavy workload.

Did you do any function-level profiles?

Last I looked at it, the real cost of page faults were all in the memory
copies and page clearing, and while it would be nice to speed up the
kernel entry and exit, the few tens of cycles we might be able to get from
there really aren't all that important.

38 million page faults may sound like a lot, but put it in other terms: if
we get rid of 20 cycles for each page fault, that's still not a lot of
actual time. Lookie here at your own numbers:

38465628 page-faults # 0.027 M/sec
4374762924204 cycles # 3029.025 M/sec

Now, if we shave 20 cycles off each page fault, that is still just, what,
0.018% or something? Not really that impressive in the end.

So I'm all for optimizing the kernel entry/exit paths, but ..

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