linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][2.6.10-mm3] remove bogus perfctr_sample_thread() calls
@ 2005-01-12 11:41 Mikael Pettersson
  0 siblings, 0 replies; only message in thread
From: Mikael Pettersson @ 2005-01-12 11:41 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

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@csd.uu.se>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-12 11:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-12 11:41 [PATCH][2.6.10-mm3] remove bogus perfctr_sample_thread() calls Mikael Pettersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).