Re: Very high CPU values in top on idle system (3.0-rc1)
From: Peter Zijlstra
Date: Tue May 31 2011 - 05:55:56 EST
On Tue, 2011-05-31 at 00:12 +0200, Peter Zijlstra wrote:
>
> I poked around with some skip_rq_update bits but couldn't make it go
> away, will try more tomorrow.
Gah, that was annoying, and explains why I wasn't seeing it on my main
dev box but could see it on my desktop (wsm tsc is much better synced
than the core2 tsc).
Could you confirm that this indeed cures the problem? I'll probably
commit a version without the toggle, but that was easy for verifying it
indeed made a difference..
---
Index: linux-2.6/kernel/sched.c
===================================================================
--- linux-2.6.orig/kernel/sched.c
+++ linux-2.6/kernel/sched.c
@@ -2604,6 +2601,8 @@ static void ttwu_queue(struct task_struc
#if defined(CONFIG_SMP)
if (sched_feat(TTWU_QUEUE) && cpu != smp_processor_id()) {
+ if (sched_feat(TTWU_SYNC_CLOCK))
+ sched_clock_cpu(cpu); /* sync clocks x-cpu */
ttwu_queue_remote(p, cpu);
return;
}
Index: linux-2.6/kernel/sched_features.h
===================================================================
--- linux-2.6.orig/kernel/sched_features.h
+++ linux-2.6/kernel/sched_features.h
@@ -70,3 +70,4 @@ SCHED_FEAT(NONIRQ_POWER, 1)
* using the scheduler IPI. Reduces rq->lock contention/bounces.
*/
SCHED_FEAT(TTWU_QUEUE, 1)
+SCHED_FEAT(TTWU_SYNC_CLOCK, 1)
--
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/