lkml.org 
[lkml]   [2009]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf_counter: Prevent oopses from per-cpu software counters
Ingo Molnar writes:

> So how about fixing these sw counts to properly work as percpu counters too?

OK, so for page faults it looks like I want to look at

get_cpu_var(vm_event_states).event[PGFAULT]

to get the per-cpu page fault count, as long as
CONFIG_VM_EVENT_COUNTERS is set.

It looks like the scheduler doesn't keep per-cpu counts of context
switches or task migrations, or if it does I couldn't find them. We
could do stuff in perf_counter_task_sched_in/out to implement per-cpu
context switch and migration counters by adding up the delta values
for each task that gets scheduled onto the cpu. Or we could add
explicit per-cpu counters for these things in the scheduler.

What do you think?

Paul.


\
 
 \ /
  Last update: 2009-02-06 05:37    [W:0.345 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site