public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* LTTng 0.87 improved page fault tracing
@ 2009-01-27 21:02 Mathieu Desnoyers
  2009-01-29  3:42 ` [ltt-dev] " KOSAKI Motohiro
  0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Desnoyers @ 2009-01-27 21:02 UTC (permalink / raw)
  To: ltt-dev, linux-kernel

Hi,

I just combined the 4 page fault handler events that were in the tracing
hot path of LTTng into 2 :

kernel page_fault_entry
kernel page_fault_exit

They take as parameter the combination of what was available in the
trap_entry/exit events and handle_mm_fault entry/exit events. This
should lessen the performance impact of the tracer when it's active.
I did the related modifications in LTTV 0.12.8.

Mathieu

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ltt-dev] LTTng 0.87 improved page fault tracing
  2009-01-27 21:02 LTTng 0.87 improved page fault tracing Mathieu Desnoyers
@ 2009-01-29  3:42 ` KOSAKI Motohiro
  2009-01-29  4:43   ` Mathieu Desnoyers
  0 siblings, 1 reply; 4+ messages in thread
From: KOSAKI Motohiro @ 2009-01-29  3:42 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: kosaki.motohiro, ltt-dev, linux-kernel

Hi

interesting..

> I just combined the 4 page fault handler events that were in the tracing
> hot path of LTTng into 2 :
> 
> kernel page_fault_entry
> kernel page_fault_exit
> 
> They take as parameter the combination of what was available in the
> trap_entry/exit events and handle_mm_fault entry/exit events. This
> should lessen the performance impact of the tracer when it's active.
> I did the related modifications in LTTV 0.12.8.

Just question.

As far as I know, customer has two different requeremtn of the page fault.
  (1) collect number of all page fault
      -> if it is too large, too many interrupt decrease performance.
  (2) collect number of major page fault
      -> major page fault indicate to increase random access I/O,
         then, some customer want to collect major page fault
         (don't include minor page fault)

Is this patch fill (2) requirement?




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ltt-dev] LTTng 0.87 improved page fault tracing
  2009-01-29  3:42 ` [ltt-dev] " KOSAKI Motohiro
@ 2009-01-29  4:43   ` Mathieu Desnoyers
  2009-01-29  4:47     ` KOSAKI Motohiro
  0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Desnoyers @ 2009-01-29  4:43 UTC (permalink / raw)
  To: KOSAKI Motohiro; +Cc: ltt-dev, linux-kernel

* KOSAKI Motohiro (kosaki.motohiro@jp.fujitsu.com) wrote:
> Hi
> 
> interesting..
> 
> > I just combined the 4 page fault handler events that were in the tracing
> > hot path of LTTng into 2 :
> > 
> > kernel page_fault_entry
> > kernel page_fault_exit
> > 
> > They take as parameter the combination of what was available in the
> > trap_entry/exit events and handle_mm_fault entry/exit events. This
> > should lessen the performance impact of the tracer when it's active.
> > I did the related modifications in LTTV 0.12.8.
> 
> Just question.
> 
> As far as I know, customer has two different requeremtn of the page fault.

    1 a)
>   (1) collect number of all page fault
>       -> if it is too large, too many interrupt decrease performance.
        (a single event is required for this)

    1 b) the user may also want to know the time spent in the page fault
    handler to service those faults, therefore involving page fault
    entry and exit events.


>   (2) collect number of major page fault
>       -> major page fault indicate to increase random access I/O,
>          then, some customer want to collect major page fault
>          (don't include minor page fault)

Yes, the trace_page_fault_exit takes the "fault" parameter returned by
handle_mm_fault (which is recorded to the trace as the "res" event
field). Using

res & VM_FAULT_MAJOR

will give only the major page faults. Note that some knowledge of the
bitmask is required to interpret the "res" bitfield. This could be done
by a specific analysis module. I would ideally like to create a LTTng
module to export tables including those bitfields so we can keep the
bitfield interpretation in sync with the kernel code changes more or
less automatically.

> 
> Is this patch fill (2) requirement?
> 

Yes.

Mathieu

> 
> 

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ltt-dev] LTTng 0.87 improved page fault tracing
  2009-01-29  4:43   ` Mathieu Desnoyers
@ 2009-01-29  4:47     ` KOSAKI Motohiro
  0 siblings, 0 replies; 4+ messages in thread
From: KOSAKI Motohiro @ 2009-01-29  4:47 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: kosaki.motohiro, ltt-dev, linux-kernel

> * KOSAKI Motohiro (kosaki.motohiro@jp.fujitsu.com) wrote:
> > Hi
> > 
> > interesting..
> > 
> > > I just combined the 4 page fault handler events that were in the tracing
> > > hot path of LTTng into 2 :
> > > 
> > > kernel page_fault_entry
> > > kernel page_fault_exit
> > > 
> > > They take as parameter the combination of what was available in the
> > > trap_entry/exit events and handle_mm_fault entry/exit events. This
> > > should lessen the performance impact of the tracer when it's active.
> > > I did the related modifications in LTTV 0.12.8.
> > 
> > Just question.
> > 
> > As far as I know, customer has two different requeremtn of the page fault.
> 
>     1 a)
> >   (1) collect number of all page fault
> >       -> if it is too large, too many interrupt decrease performance.
>         (a single event is required for this)
> 
>     1 b) the user may also want to know the time spent in the page fault
>     handler to service those faults, therefore involving page fault
>     entry and exit events.

Indeed.
that's great.


> >   (2) collect number of major page fault
> >       -> major page fault indicate to increase random access I/O,
> >          then, some customer want to collect major page fault
> >          (don't include minor page fault)
> 
> Yes, the trace_page_fault_exit takes the "fault" parameter returned by
> handle_mm_fault (which is recorded to the trace as the "res" event
> field). Using
> 
> res & VM_FAULT_MAJOR
> 
> will give only the major page faults. Note that some knowledge of the
> bitmask is required to interpret the "res" bitfield. This could be done
> by a specific analysis module. I would ideally like to create a LTTng
> module to export tables including those bitfields so we can keep the
> bitfield interpretation in sync with the kernel code changes more or
> less automatically.

Agreed.
thanks for great improvement.


> 
> > 
> > Is this patch fill (2) requirement?
> > 
> 
> Yes.
> 
> Mathieu
> 
> > 
> > 
> 
> -- 
> Mathieu Desnoyers
> OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-29  4:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-27 21:02 LTTng 0.87 improved page fault tracing Mathieu Desnoyers
2009-01-29  3:42 ` [ltt-dev] " KOSAKI Motohiro
2009-01-29  4:43   ` Mathieu Desnoyers
2009-01-29  4:47     ` KOSAKI Motohiro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox