remove bogus perfctr_sample_thread() calls
PATCH 1/1 remove bogus perfctr_sample_thread() calls
Andrew,
2.6.10-mm3 added perfctr_sample_thread() calls in account_{user,system}_time(). I believe these to be bogus:
1. When they are called from update_process_times(), there will be two perfctr_sample_thread()s per tick, one of which is redundant.
2. s390's weird timer tick code calls both account_{user,system}_time() directly, bypassing update_process_times(). In this case there also be two perfctr_sample_thread()s per tick.
I believe the proper fix is to remove the new calls and, should s390 ever get perfctr support, add _one_ perfctr_sample_thread() call in s390's account_user_vtime().
The patch below removes the extraneous calls. Please apply.
Signed-off-by Mikael Pettersson <[email protected]>
kernel/sched.c renamed from kernel/sched.c.~1~ +0 -3
@@ -2334,7 +2334,6 @@ void account_user_time(struct task_struccheck_rlimit (p, cputime);account_it_virt (p, cputime);account_it_prof (p, cputime); -perfctr_sample_thread (&p->thread);/* Add user time to cpustat. */ tmp =cputime_to_cputime64 (cputime);
@@ -2365,8 +2364,6 @@ void account_system_time(struct task_straccount_it_prof (p, cputime); } -perfctr_sample_thread (&p->thread); -/* Add system time to cpustat. */ tmp =cputime_to_cputime64 (cputime);if (hardirq_count () - hardirq_offset)