2.6.27-rc8 doubled times

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Hugh Dickins
Date: Friday, October 3, 2008 - 3:21 am

Hi Thomas,

Please would you take another look at your -rc8 commit
302745699c1b675b5d2a1af87271de10e4d96b6a clockevents:
check broadcast device not tick device.

While other machines are happy with it, I've a Core2 Duo laptop
on which "time" now gives me twice the usual user and system
times (but elapsed or real remains correct).  Thus if I run
"/usr/bin/time make -j6" twice in a kernel build tree (first
run to prime the caches), the second run reports 354%CPU,
which is more than I'm used to on a 2 cpu box! 

.config and dmesg attached.

I've noticed that bc->mode is actually a different enum from the
earlier td->mode, so I tried the patch below: it makes a difference,
261%CPU - but that's still not right so I guess there's more to it.

Thanks,
Hugh

--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -235,7 +235,7 @@ static void tick_do_broadcast_on_off(voi
 	case CLOCK_EVT_NOTIFY_BROADCAST_FORCE:
 		if (!cpu_isset(cpu, tick_broadcast_mask)) {
 			cpu_set(cpu, tick_broadcast_mask);
-			if (bc->mode == TICKDEV_MODE_PERIODIC)
+			if (bc->mode == CLOCK_EVT_MODE_PERIODIC)
 				clockevents_shutdown(dev);
 		}
 		if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE)
@@ -245,7 +245,7 @@ static void tick_do_broadcast_on_off(voi
 		if (!tick_broadcast_force &&
 		    cpu_isset(cpu, tick_broadcast_mask)) {
 			cpu_clear(cpu, tick_broadcast_mask);
-			if (bc->mode == TICKDEV_MODE_PERIODIC)
+			if (bc->mode == CLOCK_EVT_MODE_PERIODIC)
 				tick_setup_periodic(dev, 0);
 		}
 		break;
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.27-rc8 doubled times, Hugh Dickins, (Fri Oct 3, 3:21 am)
Re: 2.6.27-rc8 doubled times, Thomas Gleixner, (Fri Oct 3, 3:22 pm)
Re: 2.6.27-rc8 doubled times, Hugh Dickins, (Fri Oct 3, 5:13 pm)