public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/1]: timers: Timer Migration
@ 2008-09-16  9:12 Arun R Bharadwaj
  2008-09-16 12:05 ` Peter Zijlstra
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Arun R Bharadwaj @ 2008-09-16  9:12 UTC (permalink / raw)
  To: linux-kernel, linux-pm
  Cc: ego, tglx, mingo, a.p.zijlstra, andi, venkatesh.pallipadi, vatsa

Hi,

An idle cpu on which device drivers have initialized timers, has to be frequently woken up to service the timers. So, consolidation of timers onto a fewer number of cpus is important. Migration of
timers from idle cpus onto lesser idle cpus is necessary. Currently, timers are migrated during the cpu offline operation. However cpu-hotplug for the sake of idle system power management is too
heavy. So, this patch implements a lightweight timer migration framework.

Also, in a multi-core, multi-package system, it is always desirable to have all the timers firing on the cpus present in the same package. This would enable us to place the idle package in deep sleep
state. So, migration of timers is required for this.

A per_cpu sysfs hook is created at /sys/devices/system/cpu/cpuX/timer_migration. By echo-ing 1 to cpuX/timer_migration, all regular and hrtimers from cpuX are migrated to cpu0. The fact that all
timers are migrated from cpuX to cpu0 is demonstrated by making a note of /proc/interrupts.

$:echo 1 > /sys/devices/system/cpu/cpu3/timer_migration
$:cat /proc/interrupts > file1; sleep 30 ; cat /proc/interrupts > file2
$:diff file1 file2 | grep LOC
< LOC:       5276       2100       2676       1647       2415       1803       2275       2977   Local timer interrupts
> LOC:       6991       2195       2774       1647       2562       1900       2497       3075   Local timer interrupts

As we can observe, first we are enabling timer migration in cpu3. As a result, the number of local timer interrupts on cpu3 over the next 30 seconds are zero. cpu3  has been totally rid of all regular
and hrtimers.

Please refer to the following paper for details:

http://ols.fedoraproject.org/OLS/Reprints-2008/srinivasan1-reprint.pdf


thanks,
Arun

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-09-17  7:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-16  9:12 [RFC PATCH 0/1]: timers: Timer Migration Arun R Bharadwaj
2008-09-16 12:05 ` Peter Zijlstra
2008-09-16 16:47   ` Arun Bharadwaj
2008-09-17  7:35   ` Andrew Paprocki
2008-09-16 12:49 ` Andi Kleen
2008-09-16 13:53 ` Arjan van de Ven
2008-09-17  5:01   ` Arun R Bharadwaj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox