Re: Page Faults

From: Rakib Mullick
Date: Sat Oct 22 2011 - 03:30:15 EST


On Sat, Oct 22, 2011 at 8:12 AM, Artur Baruchi <mail.baruchi@xxxxxxxxx> wrote:
> Hi Guys.
>
> I would like to create a module (probably unsig kprobe or jproble) to
> separate some kinds of page faults. For example, suppose that during
> 10min my system experienced a total of 100 page faults. This module
> should show me that, 10 page faults happened in cache, 30 page faults
> happened in kernel pages, and so on...
> My question is... which function should I probe to accomplish this?
>
Maybe you're looking for arch/x86/mm/fault.c:do_page_fault(). But,
do_page_fault is tagged with __kprobes, so maybe you can't use this
function with kprobe. You need to find some other solutions. perf
tools has an option for page fault counting, see whether it satisfies
your need. Use 'perf list' to see all the events.

Thanks,
Rakib
--
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/