[PATCH][2.6.10-mm3] remove bogus perfctr_sample_thread() calls
From: Mikael Pettersson
Date: Wed Jan 12 2005 - 06:42:48 EST
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 <mikpe@xxxxxxxxx>
--- linux-2.6.10-mm3/kernel/sched.c.~1~ 2005-01-11 23:35:18.000000000 +0100
+++ linux-2.6.10-mm3/kernel/sched.c 2005-01-12 00:28:58.000000000 +0100
@@ -2334,7 +2334,6 @@ void account_user_time(struct task_struc
check_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_str
account_it_prof(p, cputime);
}
- perfctr_sample_thread(&p->thread);
-
/* Add system time to cpustat. */
tmp = cputime_to_cputime64(cputime);
if (hardirq_count() - hardirq_offset)
-
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/