Re: [PATCH v3] Introduce page fault tracepoint

From: H. Peter Anvin
Date: Tue Oct 15 2013 - 20:00:04 EST


On 09/09/2013 02:55 PM, Seiji Aguchi wrote:
> Change from v2
> - Print entry->ip instead of entry->regs->ip to avoid kernel crash.
> - Use %pf instead of 0x%lx to print address and ip.
>
> This patch introduces page fault tracepoints to x86 architecture
> by switching IDT.
>
> [Use case of page fault events]
>
> Two events, for user and kernel spaces, are introduced at the beginning of
> page fault handler.
>
> - User space event
> There is a request of page fault event for user space as below.
>
> http://marc.info/?l=linux-mm&m=136807959830182&w=2
> http://marc.info/?l=linux-mm&m=136807959130175&w=2
>

For permanence, please use links of the form:

http://lkml.kernel.org/r/message-id

(Yes, they currently point to marc.info, but can be redirected to point
to any archive.)

> - Kernel space event:
> Overhead in kernel space is measurable by enabling it.
>
> [Creating IDT]
>
> A way to create IDT is as below.
>
> - Introduce set_intr_gate_raw() to register just non-trace handler to IDT.
> This is used at boot time which tracing is disabled.
> - Make set_intr_gate() macro so that it can register trace handler to
> trace IDT and non-trace handler to normal IDT.
>

This is needlessly confusing, which is apart of why reviewing this patch
took a lot more time than it should.

Please break this patch into two: one which sets up the tracing IDT and
one to create the #PF tracepoint. The assumption is, I am assuming,
there will be more.

-hpa

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