All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4][V2] time: dynamic irq affinity
@ 2013-03-02 10:10 ` Daniel Lezcano
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-02 10:10 UTC (permalink / raw)
  To: john.stultz, tglx
  Cc: viresh.kumar, jacob.jun.pan, linux-arm-kernel, santosh.shilimkar,
	linux-pm, linux-kernel, linaro-kernel, patches,
	rickard.andersson, vincent.guittot, linus.walleij

When a cpu goes to a deep idle state where its local timer is shutdown,
it notifies the time framework to use the broadcast timer instead.

Unfortunately, the broadcast device could wake up any CPU, including an
idle one which is not concerned by the wake up at all.

This implies, in the worst case, an idle CPU will wake up to send an IPI
to another idle cpu.

This patch solves this by setting the irq affinity to the cpu concerned
by the nearest timer event, by this way, the CPU which is wake up is
guarantee to be the one concerned by the next event and we are safe with
unnecessary wakeup for another idle CPU.

As the irq affinity is not supported by all the archs, a flag is needed
to specify which clocksource can handle it : CLOCK_EVT_FEAT_DYNIRQ.

Tested on a u8500 board with a test program doing indefinitely usleep 10000
wired on each CPU.

With dynamic irq affinity:
Log is 10.042298 secs long with 4190 events
cpu0/state0, 24 hits, total 2718.00us, avg 113.25us, min 0.00us, max 854.00us
cpu0/state1, 994 hits, total 9874827.00us, avg 9934.43us, min 30.00us, max 10346.00us
cpu1/state0, 73 hits, total 17001.00us, avg 232.89us, min 0.00us, max 10040.00us
cpu1/state1, 1002 hits, total 9883840.00us, avg 9864.11us, min 0.00us, max 10742.00us
cluster/state0, 0 hits, total 0.00us, avg 0.00us, min 0.00us, max 0.00us
cluster/state1, 1931 hits, total 9762328.00us, avg 5055.58us, min 30.00us, max 9308.00us

Without dynamic irq affinity:
Log is 10.036834 secs long with 6574 events
cpu0/state0, 114 hits, total 20107.00us, avg 176.38us, min 0.00us, max 7233.00us
cpu0/state1, 1951 hits, total 9833836.00us, avg 5040.41us, min 0.00us, max 9217.00us
cpu1/state0, 223 hits, total 21140.00us, avg 94.80us, min 0.00us, max 2960.00us
cpu1/state1, 997 hits, total 9879748.00us, avg 9909.48us, min 0.00us, max 10346.00us
cluster/state0, 5 hits, total 5462.00us, avg 1092.40us, min 580.00us, max 2899.00us
cluster/state1, 2298 hits, total 9740988.00us, avg 4238.90us, min 30.00us, max 9217.00us

Results for the specific test case 'usleep 10000'
 * reduced by 40% the number of wake up on the system
 * reduced by 49% the number of wake up for CPU0
 * increased by factor two idle time for CPU0
 * increase by 16% package idle hits + 16% average package idle time

Changelog:

V2 :
 * mentioned CLOCK_EVT_FEAT_DYNIRQ flag name in patch description
 * added comments for CLOCK_EVT_FEAT_DYNIRQ
 * replaced tick_broadcast_set_affinity parameter to use a cpumask

V1 : initial post

Daniel Lezcano (3):
  time : pass broadcast parameter
  time : set broadcast irq affinity
  ARM: nomadik: add dynamic irq flag to the timer

Viresh Kumar (1):
  ARM: timer-sp: Set dynamic irq affinity

 arch/arm/common/timer-sp.c        |    3 ++-
 drivers/clocksource/nomadik-mtu.c |    3 ++-
 include/linux/clockchips.h        |    5 +++++
 kernel/time/tick-broadcast.c      |   41 +++++++++++++++++++++++++++++--------
 4 files changed, 42 insertions(+), 10 deletions(-)

-- 
1.7.9.5


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

* [PATCH 0/4][V2] time: dynamic irq affinity
@ 2013-03-02 10:10 ` Daniel Lezcano
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-02 10:10 UTC (permalink / raw)
  To: linux-arm-kernel

When a cpu goes to a deep idle state where its local timer is shutdown,
it notifies the time framework to use the broadcast timer instead.

Unfortunately, the broadcast device could wake up any CPU, including an
idle one which is not concerned by the wake up at all.

This implies, in the worst case, an idle CPU will wake up to send an IPI
to another idle cpu.

This patch solves this by setting the irq affinity to the cpu concerned
by the nearest timer event, by this way, the CPU which is wake up is
guarantee to be the one concerned by the next event and we are safe with
unnecessary wakeup for another idle CPU.

As the irq affinity is not supported by all the archs, a flag is needed
to specify which clocksource can handle it : CLOCK_EVT_FEAT_DYNIRQ.

Tested on a u8500 board with a test program doing indefinitely usleep 10000
wired on each CPU.

With dynamic irq affinity:
Log is 10.042298 secs long with 4190 events
cpu0/state0, 24 hits, total 2718.00us, avg 113.25us, min 0.00us, max 854.00us
cpu0/state1, 994 hits, total 9874827.00us, avg 9934.43us, min 30.00us, max 10346.00us
cpu1/state0, 73 hits, total 17001.00us, avg 232.89us, min 0.00us, max 10040.00us
cpu1/state1, 1002 hits, total 9883840.00us, avg 9864.11us, min 0.00us, max 10742.00us
cluster/state0, 0 hits, total 0.00us, avg 0.00us, min 0.00us, max 0.00us
cluster/state1, 1931 hits, total 9762328.00us, avg 5055.58us, min 30.00us, max 9308.00us

Without dynamic irq affinity:
Log is 10.036834 secs long with 6574 events
cpu0/state0, 114 hits, total 20107.00us, avg 176.38us, min 0.00us, max 7233.00us
cpu0/state1, 1951 hits, total 9833836.00us, avg 5040.41us, min 0.00us, max 9217.00us
cpu1/state0, 223 hits, total 21140.00us, avg 94.80us, min 0.00us, max 2960.00us
cpu1/state1, 997 hits, total 9879748.00us, avg 9909.48us, min 0.00us, max 10346.00us
cluster/state0, 5 hits, total 5462.00us, avg 1092.40us, min 580.00us, max 2899.00us
cluster/state1, 2298 hits, total 9740988.00us, avg 4238.90us, min 30.00us, max 9217.00us

Results for the specific test case 'usleep 10000'
 * reduced by 40% the number of wake up on the system
 * reduced by 49% the number of wake up for CPU0
 * increased by factor two idle time for CPU0
 * increase by 16% package idle hits + 16% average package idle time

Changelog:

V2 :
 * mentioned CLOCK_EVT_FEAT_DYNIRQ flag name in patch description
 * added comments for CLOCK_EVT_FEAT_DYNIRQ
 * replaced tick_broadcast_set_affinity parameter to use a cpumask

V1 : initial post

Daniel Lezcano (3):
  time : pass broadcast parameter
  time : set broadcast irq affinity
  ARM: nomadik: add dynamic irq flag to the timer

Viresh Kumar (1):
  ARM: timer-sp: Set dynamic irq affinity

 arch/arm/common/timer-sp.c        |    3 ++-
 drivers/clocksource/nomadik-mtu.c |    3 ++-
 include/linux/clockchips.h        |    5 +++++
 kernel/time/tick-broadcast.c      |   41 +++++++++++++++++++++++++++++--------
 4 files changed, 42 insertions(+), 10 deletions(-)

-- 
1.7.9.5

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

* [PATCH 1/4][V2] time : pass broadcast parameter
  2013-03-02 10:10 ` Daniel Lezcano
  (?)
@ 2013-03-02 10:10   ` Daniel Lezcano
  -1 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-02 10:10 UTC (permalink / raw)
  To: john.stultz, tglx
  Cc: viresh.kumar, jacob.jun.pan, linux-arm-kernel, santosh.shilimkar,
	linux-pm, linux-kernel, linaro-kernel, patches,
	rickard.andersson, vincent.guittot, linus.walleij

The broadcast timer could be passed as parameter to the function
instead of using again tick_broadcast_device.evtdev which was
previously used in the caller function.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 kernel/time/tick-broadcast.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 2fb8cb8..6197ac0 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -406,10 +406,9 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
 	return to_cpumask(tick_broadcast_oneshot_mask);
 }
 
-static int tick_broadcast_set_event(ktime_t expires, int force)
+static int tick_broadcast_set_event(struct clock_event_device *bc,
+				    ktime_t expires, int force)
 {
-	struct clock_event_device *bc = tick_broadcast_device.evtdev;
-
 	if (bc->mode != CLOCK_EVT_MODE_ONESHOT)
 		clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
 
@@ -479,7 +478,7 @@ again:
 		 * Rearm the broadcast device. If event expired,
 		 * repeat the above
 		 */
-		if (tick_broadcast_set_event(next_event, 0))
+		if (tick_broadcast_set_event(dev, next_event, 0))
 			goto again;
 	}
 	raw_spin_unlock(&tick_broadcast_lock);
@@ -522,7 +521,7 @@ void tick_broadcast_oneshot_control(unsigned long reason)
 			cpumask_set_cpu(cpu, tick_get_broadcast_oneshot_mask());
 			clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
 			if (dev->next_event.tv64 < bc->next_event.tv64)
-				tick_broadcast_set_event(dev->next_event, 1);
+				tick_broadcast_set_event(bc, dev->next_event, 1);
 		}
 	} else {
 		if (cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) {
@@ -591,7 +590,7 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
 			clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
 			tick_broadcast_init_next_event(to_cpumask(tmpmask),
 						       tick_next_period);
-			tick_broadcast_set_event(tick_next_period, 1);
+			tick_broadcast_set_event(bc, tick_next_period, 1);
 		} else
 			bc->next_event.tv64 = KTIME_MAX;
 	} else {
-- 
1.7.9.5


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

* [PATCH 1/4][V2] time : pass broadcast parameter
@ 2013-03-02 10:10   ` Daniel Lezcano
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-02 10:10 UTC (permalink / raw)
  To: john.stultz, tglx
  Cc: jacob.jun.pan, vincent.guittot, linus.walleij, linux-pm,
	viresh.kumar, patches, linux-kernel, rickard.andersson,
	linaro-kernel, santosh.shilimkar, linux-arm-kernel

The broadcast timer could be passed as parameter to the function
instead of using again tick_broadcast_device.evtdev which was
previously used in the caller function.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 kernel/time/tick-broadcast.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 2fb8cb8..6197ac0 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -406,10 +406,9 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
 	return to_cpumask(tick_broadcast_oneshot_mask);
 }
 
-static int tick_broadcast_set_event(ktime_t expires, int force)
+static int tick_broadcast_set_event(struct clock_event_device *bc,
+				    ktime_t expires, int force)
 {
-	struct clock_event_device *bc = tick_broadcast_device.evtdev;
-
 	if (bc->mode != CLOCK_EVT_MODE_ONESHOT)
 		clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
 
@@ -479,7 +478,7 @@ again:
 		 * Rearm the broadcast device. If event expired,
 		 * repeat the above
 		 */
-		if (tick_broadcast_set_event(next_event, 0))
+		if (tick_broadcast_set_event(dev, next_event, 0))
 			goto again;
 	}
 	raw_spin_unlock(&tick_broadcast_lock);
@@ -522,7 +521,7 @@ void tick_broadcast_oneshot_control(unsigned long reason)
 			cpumask_set_cpu(cpu, tick_get_broadcast_oneshot_mask());
 			clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
 			if (dev->next_event.tv64 < bc->next_event.tv64)
-				tick_broadcast_set_event(dev->next_event, 1);
+				tick_broadcast_set_event(bc, dev->next_event, 1);
 		}
 	} else {
 		if (cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) {
@@ -591,7 +590,7 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
 			clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
 			tick_broadcast_init_next_event(to_cpumask(tmpmask),
 						       tick_next_period);
-			tick_broadcast_set_event(tick_next_period, 1);
+			tick_broadcast_set_event(bc, tick_next_period, 1);
 		} else
 			bc->next_event.tv64 = KTIME_MAX;
 	} else {
-- 
1.7.9.5

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

* [PATCH 1/4][V2] time : pass broadcast parameter
@ 2013-03-02 10:10   ` Daniel Lezcano
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-02 10:10 UTC (permalink / raw)
  To: linux-arm-kernel

The broadcast timer could be passed as parameter to the function
instead of using again tick_broadcast_device.evtdev which was
previously used in the caller function.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 kernel/time/tick-broadcast.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 2fb8cb8..6197ac0 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -406,10 +406,9 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
 	return to_cpumask(tick_broadcast_oneshot_mask);
 }
 
-static int tick_broadcast_set_event(ktime_t expires, int force)
+static int tick_broadcast_set_event(struct clock_event_device *bc,
+				    ktime_t expires, int force)
 {
-	struct clock_event_device *bc = tick_broadcast_device.evtdev;
-
 	if (bc->mode != CLOCK_EVT_MODE_ONESHOT)
 		clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
 
@@ -479,7 +478,7 @@ again:
 		 * Rearm the broadcast device. If event expired,
 		 * repeat the above
 		 */
-		if (tick_broadcast_set_event(next_event, 0))
+		if (tick_broadcast_set_event(dev, next_event, 0))
 			goto again;
 	}
 	raw_spin_unlock(&tick_broadcast_lock);
@@ -522,7 +521,7 @@ void tick_broadcast_oneshot_control(unsigned long reason)
 			cpumask_set_cpu(cpu, tick_get_broadcast_oneshot_mask());
 			clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
 			if (dev->next_event.tv64 < bc->next_event.tv64)
-				tick_broadcast_set_event(dev->next_event, 1);
+				tick_broadcast_set_event(bc, dev->next_event, 1);
 		}
 	} else {
 		if (cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) {
@@ -591,7 +590,7 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
 			clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
 			tick_broadcast_init_next_event(to_cpumask(tmpmask),
 						       tick_next_period);
-			tick_broadcast_set_event(tick_next_period, 1);
+			tick_broadcast_set_event(bc, tick_next_period, 1);
 		} else
 			bc->next_event.tv64 = KTIME_MAX;
 	} else {
-- 
1.7.9.5

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

* [PATCH 2/4][V2] time : set broadcast irq affinity
  2013-03-02 10:10 ` Daniel Lezcano
@ 2013-03-02 10:10   ` Daniel Lezcano
  -1 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-02 10:10 UTC (permalink / raw)
  To: john.stultz, tglx
  Cc: viresh.kumar, jacob.jun.pan, linux-arm-kernel, santosh.shilimkar,
	linux-pm, linux-kernel, linaro-kernel, patches,
	rickard.andersson, vincent.guittot, linus.walleij

When a cpu goes to a deep idle state where its local timer is shutdown,
it notifies the time frame work to use the broadcast timer instead.

Unfortunately, the broadcast device could wake up any CPU, including an
idle one which is not concerned by the wake up at all.

This implies, in the worst case, an idle CPU will wake up to send an IPI
to another idle cpu.

This patch solves this by setting the irq affinity to the cpu concerned
by the nearest timer event, by this way, the CPU which is wake up is
guarantee to be the one concerned by the next event and we are safe with
unnecessary wakeup for another idle CPU.

As the irq affinity is not supported by all the archs, a flag is needed
to specify which clocksource can handle it : CLOCK_EVT_FEAT_DYNIRQ

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 include/linux/clockchips.h   |    5 +++++
 kernel/time/tick-broadcast.c |   40 +++++++++++++++++++++++++++++++++-------
 2 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 6634652..c93e2a6 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -55,6 +55,11 @@ enum clock_event_nofitiers {
 #define CLOCK_EVT_FEAT_C3STOP		0x000008
 #define CLOCK_EVT_FEAT_DUMMY		0x000010
 
+/*
+ * Clock event device can set its irq affinity dynamically
+ */
+#define CLOCK_EVT_FEAT_DYNIRQ		0x000020
+
 /**
  * struct clock_event_device - clock event device descriptor
  * @event_handler:	Assigned by the framework to be called by the low
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 6197ac0..9ca8ff5 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -406,13 +406,37 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
 	return to_cpumask(tick_broadcast_oneshot_mask);
 }
 
-static int tick_broadcast_set_event(struct clock_event_device *bc,
+/*
+ * Set broadcast interrupt affinity
+ */
+static void tick_broadcast_set_affinity(struct clock_event_device *bc,
+					const struct cpumask *cpumask)
+{
+	if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
+		return;
+
+	if (cpumask_equal(bc->cpumask, cpumask))
+		return;
+
+	bc->cpumask = cpumask;
+	irq_set_affinity(bc->irq, bc->cpumask);
+}
+
+static int tick_broadcast_set_event(struct clock_event_device *bc, int cpu,
 				    ktime_t expires, int force)
 {
+	int ret;
+
 	if (bc->mode != CLOCK_EVT_MODE_ONESHOT)
 		clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
 
-	return clockevents_program_event(bc, expires, force);
+	ret = clockevents_program_event(bc, expires, force);
+	if (ret)
+		return ret;
+
+	tick_broadcast_set_affinity(bc, cpumask_of(cpu));
+
+	return 0;
 }
 
 int tick_resume_broadcast_oneshot(struct clock_event_device *bc)
@@ -441,7 +465,7 @@ static void tick_handle_oneshot_broadcast(struct clock_event_device *dev)
 {
 	struct tick_device *td;
 	ktime_t now, next_event;
-	int cpu;
+	int cpu, next_cpu;
 
 	raw_spin_lock(&tick_broadcast_lock);
 again:
@@ -454,8 +478,10 @@ again:
 		td = &per_cpu(tick_cpu_device, cpu);
 		if (td->evtdev->next_event.tv64 <= now.tv64)
 			cpumask_set_cpu(cpu, to_cpumask(tmpmask));
-		else if (td->evtdev->next_event.tv64 < next_event.tv64)
+		else if (td->evtdev->next_event.tv64 < next_event.tv64) {
 			next_event.tv64 = td->evtdev->next_event.tv64;
+			next_cpu = cpu;
+		}
 	}
 
 	/*
@@ -478,7 +504,7 @@ again:
 		 * Rearm the broadcast device. If event expired,
 		 * repeat the above
 		 */
-		if (tick_broadcast_set_event(dev, next_event, 0))
+		if (tick_broadcast_set_event(dev, next_cpu, next_event, 0))
 			goto again;
 	}
 	raw_spin_unlock(&tick_broadcast_lock);
@@ -521,7 +547,7 @@ void tick_broadcast_oneshot_control(unsigned long reason)
 			cpumask_set_cpu(cpu, tick_get_broadcast_oneshot_mask());
 			clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
 			if (dev->next_event.tv64 < bc->next_event.tv64)
-				tick_broadcast_set_event(bc, dev->next_event, 1);
+				tick_broadcast_set_event(bc, cpu, dev->next_event, 1);
 		}
 	} else {
 		if (cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) {
@@ -590,7 +616,7 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
 			clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
 			tick_broadcast_init_next_event(to_cpumask(tmpmask),
 						       tick_next_period);
-			tick_broadcast_set_event(bc, tick_next_period, 1);
+			tick_broadcast_set_event(bc, cpu, tick_next_period, 1);
 		} else
 			bc->next_event.tv64 = KTIME_MAX;
 	} else {
-- 
1.7.9.5


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

* [PATCH 2/4][V2] time : set broadcast irq affinity
@ 2013-03-02 10:10   ` Daniel Lezcano
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-02 10:10 UTC (permalink / raw)
  To: linux-arm-kernel

When a cpu goes to a deep idle state where its local timer is shutdown,
it notifies the time frame work to use the broadcast timer instead.

Unfortunately, the broadcast device could wake up any CPU, including an
idle one which is not concerned by the wake up at all.

This implies, in the worst case, an idle CPU will wake up to send an IPI
to another idle cpu.

This patch solves this by setting the irq affinity to the cpu concerned
by the nearest timer event, by this way, the CPU which is wake up is
guarantee to be the one concerned by the next event and we are safe with
unnecessary wakeup for another idle CPU.

As the irq affinity is not supported by all the archs, a flag is needed
to specify which clocksource can handle it : CLOCK_EVT_FEAT_DYNIRQ

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 include/linux/clockchips.h   |    5 +++++
 kernel/time/tick-broadcast.c |   40 +++++++++++++++++++++++++++++++++-------
 2 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 6634652..c93e2a6 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -55,6 +55,11 @@ enum clock_event_nofitiers {
 #define CLOCK_EVT_FEAT_C3STOP		0x000008
 #define CLOCK_EVT_FEAT_DUMMY		0x000010
 
+/*
+ * Clock event device can set its irq affinity dynamically
+ */
+#define CLOCK_EVT_FEAT_DYNIRQ		0x000020
+
 /**
  * struct clock_event_device - clock event device descriptor
  * @event_handler:	Assigned by the framework to be called by the low
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 6197ac0..9ca8ff5 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -406,13 +406,37 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
 	return to_cpumask(tick_broadcast_oneshot_mask);
 }
 
-static int tick_broadcast_set_event(struct clock_event_device *bc,
+/*
+ * Set broadcast interrupt affinity
+ */
+static void tick_broadcast_set_affinity(struct clock_event_device *bc,
+					const struct cpumask *cpumask)
+{
+	if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
+		return;
+
+	if (cpumask_equal(bc->cpumask, cpumask))
+		return;
+
+	bc->cpumask = cpumask;
+	irq_set_affinity(bc->irq, bc->cpumask);
+}
+
+static int tick_broadcast_set_event(struct clock_event_device *bc, int cpu,
 				    ktime_t expires, int force)
 {
+	int ret;
+
 	if (bc->mode != CLOCK_EVT_MODE_ONESHOT)
 		clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
 
-	return clockevents_program_event(bc, expires, force);
+	ret = clockevents_program_event(bc, expires, force);
+	if (ret)
+		return ret;
+
+	tick_broadcast_set_affinity(bc, cpumask_of(cpu));
+
+	return 0;
 }
 
 int tick_resume_broadcast_oneshot(struct clock_event_device *bc)
@@ -441,7 +465,7 @@ static void tick_handle_oneshot_broadcast(struct clock_event_device *dev)
 {
 	struct tick_device *td;
 	ktime_t now, next_event;
-	int cpu;
+	int cpu, next_cpu;
 
 	raw_spin_lock(&tick_broadcast_lock);
 again:
@@ -454,8 +478,10 @@ again:
 		td = &per_cpu(tick_cpu_device, cpu);
 		if (td->evtdev->next_event.tv64 <= now.tv64)
 			cpumask_set_cpu(cpu, to_cpumask(tmpmask));
-		else if (td->evtdev->next_event.tv64 < next_event.tv64)
+		else if (td->evtdev->next_event.tv64 < next_event.tv64) {
 			next_event.tv64 = td->evtdev->next_event.tv64;
+			next_cpu = cpu;
+		}
 	}
 
 	/*
@@ -478,7 +504,7 @@ again:
 		 * Rearm the broadcast device. If event expired,
 		 * repeat the above
 		 */
-		if (tick_broadcast_set_event(dev, next_event, 0))
+		if (tick_broadcast_set_event(dev, next_cpu, next_event, 0))
 			goto again;
 	}
 	raw_spin_unlock(&tick_broadcast_lock);
@@ -521,7 +547,7 @@ void tick_broadcast_oneshot_control(unsigned long reason)
 			cpumask_set_cpu(cpu, tick_get_broadcast_oneshot_mask());
 			clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
 			if (dev->next_event.tv64 < bc->next_event.tv64)
-				tick_broadcast_set_event(bc, dev->next_event, 1);
+				tick_broadcast_set_event(bc, cpu, dev->next_event, 1);
 		}
 	} else {
 		if (cpumask_test_cpu(cpu, tick_get_broadcast_oneshot_mask())) {
@@ -590,7 +616,7 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
 			clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
 			tick_broadcast_init_next_event(to_cpumask(tmpmask),
 						       tick_next_period);
-			tick_broadcast_set_event(bc, tick_next_period, 1);
+			tick_broadcast_set_event(bc, cpu, tick_next_period, 1);
 		} else
 			bc->next_event.tv64 = KTIME_MAX;
 	} else {
-- 
1.7.9.5

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

* [PATCH 3/4][V2] ARM: nomadik: add dynamic irq flag to the timer
  2013-03-02 10:10 ` Daniel Lezcano
@ 2013-03-02 10:10   ` Daniel Lezcano
  -1 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-02 10:10 UTC (permalink / raw)
  To: john.stultz, tglx
  Cc: viresh.kumar, jacob.jun.pan, linux-arm-kernel, santosh.shilimkar,
	linux-pm, linux-kernel, linaro-kernel, patches,
	rickard.andersson, vincent.guittot, linus.walleij

Add the dynamic irq affinity feature to the timer clock device.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
---
 drivers/clocksource/nomadik-mtu.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/nomadik-mtu.c b/drivers/clocksource/nomadik-mtu.c
index 7cbcaa0..73dc540 100644
--- a/drivers/clocksource/nomadik-mtu.c
+++ b/drivers/clocksource/nomadik-mtu.c
@@ -136,7 +136,8 @@ static void nmdk_clkevt_mode(enum clock_event_mode mode,
 
 static struct clock_event_device nmdk_clkevt = {
 	.name		= "mtu_1",
-	.features	= CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_PERIODIC,
+	.features	= CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_PERIODIC |
+	                  CLOCK_EVT_FEAT_DYNIRQ,
 	.rating		= 200,
 	.set_mode	= nmdk_clkevt_mode,
 	.set_next_event	= nmdk_clkevt_next,
-- 
1.7.9.5


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

* [PATCH 3/4][V2] ARM: nomadik: add dynamic irq flag to the timer
@ 2013-03-02 10:10   ` Daniel Lezcano
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-02 10:10 UTC (permalink / raw)
  To: linux-arm-kernel

Add the dynamic irq affinity feature to the timer clock device.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
---
 drivers/clocksource/nomadik-mtu.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/nomadik-mtu.c b/drivers/clocksource/nomadik-mtu.c
index 7cbcaa0..73dc540 100644
--- a/drivers/clocksource/nomadik-mtu.c
+++ b/drivers/clocksource/nomadik-mtu.c
@@ -136,7 +136,8 @@ static void nmdk_clkevt_mode(enum clock_event_mode mode,
 
 static struct clock_event_device nmdk_clkevt = {
 	.name		= "mtu_1",
-	.features	= CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_PERIODIC,
+	.features	= CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_PERIODIC |
+	                  CLOCK_EVT_FEAT_DYNIRQ,
 	.rating		= 200,
 	.set_mode	= nmdk_clkevt_mode,
 	.set_next_event	= nmdk_clkevt_next,
-- 
1.7.9.5

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

* [PATCH 4/4][V2] ARM: timer-sp: Set dynamic irq affinity
  2013-03-02 10:10 ` Daniel Lezcano
@ 2013-03-02 10:10   ` Daniel Lezcano
  -1 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-02 10:10 UTC (permalink / raw)
  To: john.stultz, tglx
  Cc: viresh.kumar, jacob.jun.pan, linux-arm-kernel, santosh.shilimkar,
	linux-pm, linux-kernel, linaro-kernel, patches,
	rickard.andersson, vincent.guittot, linus.walleij

From: Viresh Kumar <viresh.kumar@linaro.org>

When a cpu goes to a deep idle state where its local timer is shutdown, it
notifies the time frame work to use the broadcast timer instead.

Unfortunately, the broadcast device could wake up any CPU, including an idle one
which is not concerned by the wake up at all.

This implies, in the worst case, an idle CPU will wake up to send an IPI to
another idle cpu.

This patch fixes this for ARM platforms using timer-sp, by setting
CLOCK_EVT_FEAT_DYNIRQ feature.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 arch/arm/common/timer-sp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
index 9d2d3ba..ae3c0f9 100644
--- a/arch/arm/common/timer-sp.c
+++ b/arch/arm/common/timer-sp.c
@@ -158,7 +158,8 @@ static int sp804_set_next_event(unsigned long next,
 }
 
 static struct clock_event_device sp804_clockevent = {
-	.features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
+	.features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT |
+		CLOCK_EVT_FEAT_DYNIRQ,
 	.set_mode	= sp804_set_mode,
 	.set_next_event	= sp804_set_next_event,
 	.rating		= 300,
-- 
1.7.9.5


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

* [PATCH 4/4][V2] ARM: timer-sp: Set dynamic irq affinity
@ 2013-03-02 10:10   ` Daniel Lezcano
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-02 10:10 UTC (permalink / raw)
  To: linux-arm-kernel

From: Viresh Kumar <viresh.kumar@linaro.org>

When a cpu goes to a deep idle state where its local timer is shutdown, it
notifies the time frame work to use the broadcast timer instead.

Unfortunately, the broadcast device could wake up any CPU, including an idle one
which is not concerned by the wake up at all.

This implies, in the worst case, an idle CPU will wake up to send an IPI to
another idle cpu.

This patch fixes this for ARM platforms using timer-sp, by setting
CLOCK_EVT_FEAT_DYNIRQ feature.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 arch/arm/common/timer-sp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
index 9d2d3ba..ae3c0f9 100644
--- a/arch/arm/common/timer-sp.c
+++ b/arch/arm/common/timer-sp.c
@@ -158,7 +158,8 @@ static int sp804_set_next_event(unsigned long next,
 }
 
 static struct clock_event_device sp804_clockevent = {
-	.features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
+	.features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT |
+		CLOCK_EVT_FEAT_DYNIRQ,
 	.set_mode	= sp804_set_mode,
 	.set_next_event	= sp804_set_next_event,
 	.rating		= 300,
-- 
1.7.9.5

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

* Re: [PATCH 2/4][V2] time : set broadcast irq affinity
  2013-03-02 10:10   ` Daniel Lezcano
@ 2013-03-05 20:40     ` Thomas Gleixner
  -1 siblings, 0 replies; 39+ messages in thread
From: Thomas Gleixner @ 2013-03-05 20:40 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: john.stultz, viresh.kumar, jacob.jun.pan, linux-arm-kernel,
	santosh.shilimkar, linux-pm, linux-kernel, linaro-kernel,
	patches, rickard.andersson, vincent.guittot, linus.walleij

On Sat, 2 Mar 2013, Daniel Lezcano wrote:
> When a cpu goes to a deep idle state where its local timer is shutdown,
> it notifies the time frame work to use the broadcast timer instead.
> 
> Unfortunately, the broadcast device could wake up any CPU, including an
> idle one which is not concerned by the wake up at all.
> 
> This implies, in the worst case, an idle CPU will wake up to send an IPI
> to another idle cpu.
> 
> This patch solves this by setting the irq affinity to the cpu concerned
> by the nearest timer event, by this way, the CPU which is wake up is
> guarantee to be the one concerned by the next event and we are safe with
> unnecessary wakeup for another idle CPU.
> 
> As the irq affinity is not supported by all the archs, a flag is needed
> to specify which clocksource can handle it : CLOCK_EVT_FEAT_DYNIRQ
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  include/linux/clockchips.h   |    5 +++++
>  kernel/time/tick-broadcast.c |   40 +++++++++++++++++++++++++++++++++-------
>  2 files changed, 38 insertions(+), 7 deletions(-)
> 
> diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
> index 6634652..c93e2a6 100644
> --- a/include/linux/clockchips.h
> +++ b/include/linux/clockchips.h
> @@ -55,6 +55,11 @@ enum clock_event_nofitiers {
>  #define CLOCK_EVT_FEAT_C3STOP		0x000008
>  #define CLOCK_EVT_FEAT_DUMMY		0x000010
>  
> +/*
> + * Clock event device can set its irq affinity dynamically
> + */
> +#define CLOCK_EVT_FEAT_DYNIRQ		0x000020
> +
>  /**
>   * struct clock_event_device - clock event device descriptor
>   * @event_handler:	Assigned by the framework to be called by the low
> diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
> index 6197ac0..9ca8ff5 100644
> --- a/kernel/time/tick-broadcast.c
> +++ b/kernel/time/tick-broadcast.c
> @@ -406,13 +406,37 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
>  	return to_cpumask(tick_broadcast_oneshot_mask);
>  }
>  
> -static int tick_broadcast_set_event(struct clock_event_device *bc,
> +/*
> + * Set broadcast interrupt affinity
> + */
> +static void tick_broadcast_set_affinity(struct clock_event_device *bc,
> +					const struct cpumask *cpumask)
> +{
> +	if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
> +		return;
> +
> +	if (cpumask_equal(bc->cpumask, cpumask))
> +		return;
> +
> +	bc->cpumask = cpumask;

This breaks with CONFIG_CPUMASK_OFFSTACK=y. cpumask_copy() is your friend!

Thanks,

	tglx

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

* [PATCH 2/4][V2] time : set broadcast irq affinity
@ 2013-03-05 20:40     ` Thomas Gleixner
  0 siblings, 0 replies; 39+ messages in thread
From: Thomas Gleixner @ 2013-03-05 20:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, 2 Mar 2013, Daniel Lezcano wrote:
> When a cpu goes to a deep idle state where its local timer is shutdown,
> it notifies the time frame work to use the broadcast timer instead.
> 
> Unfortunately, the broadcast device could wake up any CPU, including an
> idle one which is not concerned by the wake up at all.
> 
> This implies, in the worst case, an idle CPU will wake up to send an IPI
> to another idle cpu.
> 
> This patch solves this by setting the irq affinity to the cpu concerned
> by the nearest timer event, by this way, the CPU which is wake up is
> guarantee to be the one concerned by the next event and we are safe with
> unnecessary wakeup for another idle CPU.
> 
> As the irq affinity is not supported by all the archs, a flag is needed
> to specify which clocksource can handle it : CLOCK_EVT_FEAT_DYNIRQ
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  include/linux/clockchips.h   |    5 +++++
>  kernel/time/tick-broadcast.c |   40 +++++++++++++++++++++++++++++++++-------
>  2 files changed, 38 insertions(+), 7 deletions(-)
> 
> diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
> index 6634652..c93e2a6 100644
> --- a/include/linux/clockchips.h
> +++ b/include/linux/clockchips.h
> @@ -55,6 +55,11 @@ enum clock_event_nofitiers {
>  #define CLOCK_EVT_FEAT_C3STOP		0x000008
>  #define CLOCK_EVT_FEAT_DUMMY		0x000010
>  
> +/*
> + * Clock event device can set its irq affinity dynamically
> + */
> +#define CLOCK_EVT_FEAT_DYNIRQ		0x000020
> +
>  /**
>   * struct clock_event_device - clock event device descriptor
>   * @event_handler:	Assigned by the framework to be called by the low
> diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
> index 6197ac0..9ca8ff5 100644
> --- a/kernel/time/tick-broadcast.c
> +++ b/kernel/time/tick-broadcast.c
> @@ -406,13 +406,37 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
>  	return to_cpumask(tick_broadcast_oneshot_mask);
>  }
>  
> -static int tick_broadcast_set_event(struct clock_event_device *bc,
> +/*
> + * Set broadcast interrupt affinity
> + */
> +static void tick_broadcast_set_affinity(struct clock_event_device *bc,
> +					const struct cpumask *cpumask)
> +{
> +	if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
> +		return;
> +
> +	if (cpumask_equal(bc->cpumask, cpumask))
> +		return;
> +
> +	bc->cpumask = cpumask;

This breaks with CONFIG_CPUMASK_OFFSTACK=y. cpumask_copy() is your friend!

Thanks,

	tglx

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

* Re: [PATCH 2/4][V2] time : set broadcast irq affinity
  2013-03-05 20:40     ` Thomas Gleixner
@ 2013-03-06  9:27       ` Daniel Lezcano
  -1 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-06  9:27 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: john.stultz, viresh.kumar, jacob.jun.pan, linux-arm-kernel,
	santosh.shilimkar, linux-pm, linux-kernel, linaro-kernel,
	patches, rickard.andersson, vincent.guittot, linus.walleij

On 03/05/2013 09:40 PM, Thomas Gleixner wrote:
> On Sat, 2 Mar 2013, Daniel Lezcano wrote:
>> When a cpu goes to a deep idle state where its local timer is shutdown,
>> it notifies the time frame work to use the broadcast timer instead.
>>
>> Unfortunately, the broadcast device could wake up any CPU, including an
>> idle one which is not concerned by the wake up at all.
>>
>> This implies, in the worst case, an idle CPU will wake up to send an IPI
>> to another idle cpu.
>>
>> This patch solves this by setting the irq affinity to the cpu concerned
>> by the nearest timer event, by this way, the CPU which is wake up is
>> guarantee to be the one concerned by the next event and we are safe with
>> unnecessary wakeup for another idle CPU.
>>
>> As the irq affinity is not supported by all the archs, a flag is needed
>> to specify which clocksource can handle it : CLOCK_EVT_FEAT_DYNIRQ
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
>>  include/linux/clockchips.h   |    5 +++++
>>  kernel/time/tick-broadcast.c |   40 +++++++++++++++++++++++++++++++++-------
>>  2 files changed, 38 insertions(+), 7 deletions(-)
>>
>> diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
>> index 6634652..c93e2a6 100644
>> --- a/include/linux/clockchips.h
>> +++ b/include/linux/clockchips.h
>> @@ -55,6 +55,11 @@ enum clock_event_nofitiers {
>>  #define CLOCK_EVT_FEAT_C3STOP		0x000008
>>  #define CLOCK_EVT_FEAT_DUMMY		0x000010
>>  
>> +/*
>> + * Clock event device can set its irq affinity dynamically
>> + */
>> +#define CLOCK_EVT_FEAT_DYNIRQ		0x000020
>> +
>>  /**
>>   * struct clock_event_device - clock event device descriptor
>>   * @event_handler:	Assigned by the framework to be called by the low
>> diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
>> index 6197ac0..9ca8ff5 100644
>> --- a/kernel/time/tick-broadcast.c
>> +++ b/kernel/time/tick-broadcast.c
>> @@ -406,13 +406,37 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
>>  	return to_cpumask(tick_broadcast_oneshot_mask);
>>  }
>>  
>> -static int tick_broadcast_set_event(struct clock_event_device *bc,
>> +/*
>> + * Set broadcast interrupt affinity
>> + */
>> +static void tick_broadcast_set_affinity(struct clock_event_device *bc,
>> +					const struct cpumask *cpumask)
>> +{
>> +	if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
>> +		return;
>> +
>> +	if (cpumask_equal(bc->cpumask, cpumask))
>> +		return;
>> +
>> +	bc->cpumask = cpumask;
> 
> This breaks with CONFIG_CPUMASK_OFFSTACK=y. cpumask_copy() is your friend!

This instruction copies the pointer, not the cpumask content.

bc->cpumask is defined as a const struct cpumask * and is used to copy a
cpumask pointer not the content.

The cpumask parameter is a pointer to a global cpumask provided by the
cpumask_of macro.

But to be in the safe side, I compiled tested with
CONFIG_CPUMASK_OFFSTACK=y without problem.

Did I missed something ?

Thanks
  -- Daniel

> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* [PATCH 2/4][V2] time : set broadcast irq affinity
@ 2013-03-06  9:27       ` Daniel Lezcano
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-06  9:27 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/05/2013 09:40 PM, Thomas Gleixner wrote:
> On Sat, 2 Mar 2013, Daniel Lezcano wrote:
>> When a cpu goes to a deep idle state where its local timer is shutdown,
>> it notifies the time frame work to use the broadcast timer instead.
>>
>> Unfortunately, the broadcast device could wake up any CPU, including an
>> idle one which is not concerned by the wake up at all.
>>
>> This implies, in the worst case, an idle CPU will wake up to send an IPI
>> to another idle cpu.
>>
>> This patch solves this by setting the irq affinity to the cpu concerned
>> by the nearest timer event, by this way, the CPU which is wake up is
>> guarantee to be the one concerned by the next event and we are safe with
>> unnecessary wakeup for another idle CPU.
>>
>> As the irq affinity is not supported by all the archs, a flag is needed
>> to specify which clocksource can handle it : CLOCK_EVT_FEAT_DYNIRQ
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
>>  include/linux/clockchips.h   |    5 +++++
>>  kernel/time/tick-broadcast.c |   40 +++++++++++++++++++++++++++++++++-------
>>  2 files changed, 38 insertions(+), 7 deletions(-)
>>
>> diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
>> index 6634652..c93e2a6 100644
>> --- a/include/linux/clockchips.h
>> +++ b/include/linux/clockchips.h
>> @@ -55,6 +55,11 @@ enum clock_event_nofitiers {
>>  #define CLOCK_EVT_FEAT_C3STOP		0x000008
>>  #define CLOCK_EVT_FEAT_DUMMY		0x000010
>>  
>> +/*
>> + * Clock event device can set its irq affinity dynamically
>> + */
>> +#define CLOCK_EVT_FEAT_DYNIRQ		0x000020
>> +
>>  /**
>>   * struct clock_event_device - clock event device descriptor
>>   * @event_handler:	Assigned by the framework to be called by the low
>> diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
>> index 6197ac0..9ca8ff5 100644
>> --- a/kernel/time/tick-broadcast.c
>> +++ b/kernel/time/tick-broadcast.c
>> @@ -406,13 +406,37 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
>>  	return to_cpumask(tick_broadcast_oneshot_mask);
>>  }
>>  
>> -static int tick_broadcast_set_event(struct clock_event_device *bc,
>> +/*
>> + * Set broadcast interrupt affinity
>> + */
>> +static void tick_broadcast_set_affinity(struct clock_event_device *bc,
>> +					const struct cpumask *cpumask)
>> +{
>> +	if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
>> +		return;
>> +
>> +	if (cpumask_equal(bc->cpumask, cpumask))
>> +		return;
>> +
>> +	bc->cpumask = cpumask;
> 
> This breaks with CONFIG_CPUMASK_OFFSTACK=y. cpumask_copy() is your friend!

This instruction copies the pointer, not the cpumask content.

bc->cpumask is defined as a const struct cpumask * and is used to copy a
cpumask pointer not the content.

The cpumask parameter is a pointer to a global cpumask provided by the
cpumask_of macro.

But to be in the safe side, I compiled tested with
CONFIG_CPUMASK_OFFSTACK=y without problem.

Did I missed something ?

Thanks
  -- Daniel

> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

* Re: [PATCH 2/4][V2] time : set broadcast irq affinity
  2013-03-06  9:27       ` Daniel Lezcano
@ 2013-03-06  9:48         ` Thomas Gleixner
  -1 siblings, 0 replies; 39+ messages in thread
From: Thomas Gleixner @ 2013-03-06  9:48 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: john.stultz, viresh.kumar, jacob.jun.pan, linux-arm-kernel,
	santosh.shilimkar, linux-pm, linux-kernel, linaro-kernel,
	patches, rickard.andersson, vincent.guittot, linus.walleij

On Wed, 6 Mar 2013, Daniel Lezcano wrote:
> On 03/05/2013 09:40 PM, Thomas Gleixner wrote:
> > On Sat, 2 Mar 2013, Daniel Lezcano wrote:
> >> When a cpu goes to a deep idle state where its local timer is shutdown,
> >> it notifies the time frame work to use the broadcast timer instead.
> >>
> >> Unfortunately, the broadcast device could wake up any CPU, including an
> >> idle one which is not concerned by the wake up at all.
> >>
> >> This implies, in the worst case, an idle CPU will wake up to send an IPI
> >> to another idle cpu.
> >>
> >> This patch solves this by setting the irq affinity to the cpu concerned
> >> by the nearest timer event, by this way, the CPU which is wake up is
> >> guarantee to be the one concerned by the next event and we are safe with
> >> unnecessary wakeup for another idle CPU.
> >>
> >> As the irq affinity is not supported by all the archs, a flag is needed
> >> to specify which clocksource can handle it : CLOCK_EVT_FEAT_DYNIRQ
> >>
> >> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> >> ---
> >>  include/linux/clockchips.h   |    5 +++++
> >>  kernel/time/tick-broadcast.c |   40 +++++++++++++++++++++++++++++++++-------
> >>  2 files changed, 38 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
> >> index 6634652..c93e2a6 100644
> >> --- a/include/linux/clockchips.h
> >> +++ b/include/linux/clockchips.h
> >> @@ -55,6 +55,11 @@ enum clock_event_nofitiers {
> >>  #define CLOCK_EVT_FEAT_C3STOP		0x000008
> >>  #define CLOCK_EVT_FEAT_DUMMY		0x000010
> >>  
> >> +/*
> >> + * Clock event device can set its irq affinity dynamically
> >> + */
> >> +#define CLOCK_EVT_FEAT_DYNIRQ		0x000020
> >> +
> >>  /**
> >>   * struct clock_event_device - clock event device descriptor
> >>   * @event_handler:	Assigned by the framework to be called by the low
> >> diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
> >> index 6197ac0..9ca8ff5 100644
> >> --- a/kernel/time/tick-broadcast.c
> >> +++ b/kernel/time/tick-broadcast.c
> >> @@ -406,13 +406,37 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
> >>  	return to_cpumask(tick_broadcast_oneshot_mask);
> >>  }
> >>  
> >> -static int tick_broadcast_set_event(struct clock_event_device *bc,
> >> +/*
> >> + * Set broadcast interrupt affinity
> >> + */
> >> +static void tick_broadcast_set_affinity(struct clock_event_device *bc,
> >> +					const struct cpumask *cpumask)
> >> +{
> >> +	if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
> >> +		return;
> >> +
> >> +	if (cpumask_equal(bc->cpumask, cpumask))
> >> +		return;
> >> +
> >> +	bc->cpumask = cpumask;
> > 
> > This breaks with CONFIG_CPUMASK_OFFSTACK=y. cpumask_copy() is your friend!
> 
> This instruction copies the pointer, not the cpumask content.
> 
> bc->cpumask is defined as a const struct cpumask * and is used to copy a
> cpumask pointer not the content.
> 
> The cpumask parameter is a pointer to a global cpumask provided by the
> cpumask_of macro.
> 
> But to be in the safe side, I compiled tested with
> CONFIG_CPUMASK_OFFSTACK=y without problem.
> 
> Did I missed something ?

No, I misinterpreted the patch. Assigning a pointer is safe. 

Thanks,

	tglx

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

* [PATCH 2/4][V2] time : set broadcast irq affinity
@ 2013-03-06  9:48         ` Thomas Gleixner
  0 siblings, 0 replies; 39+ messages in thread
From: Thomas Gleixner @ 2013-03-06  9:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 6 Mar 2013, Daniel Lezcano wrote:
> On 03/05/2013 09:40 PM, Thomas Gleixner wrote:
> > On Sat, 2 Mar 2013, Daniel Lezcano wrote:
> >> When a cpu goes to a deep idle state where its local timer is shutdown,
> >> it notifies the time frame work to use the broadcast timer instead.
> >>
> >> Unfortunately, the broadcast device could wake up any CPU, including an
> >> idle one which is not concerned by the wake up at all.
> >>
> >> This implies, in the worst case, an idle CPU will wake up to send an IPI
> >> to another idle cpu.
> >>
> >> This patch solves this by setting the irq affinity to the cpu concerned
> >> by the nearest timer event, by this way, the CPU which is wake up is
> >> guarantee to be the one concerned by the next event and we are safe with
> >> unnecessary wakeup for another idle CPU.
> >>
> >> As the irq affinity is not supported by all the archs, a flag is needed
> >> to specify which clocksource can handle it : CLOCK_EVT_FEAT_DYNIRQ
> >>
> >> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> >> ---
> >>  include/linux/clockchips.h   |    5 +++++
> >>  kernel/time/tick-broadcast.c |   40 +++++++++++++++++++++++++++++++++-------
> >>  2 files changed, 38 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
> >> index 6634652..c93e2a6 100644
> >> --- a/include/linux/clockchips.h
> >> +++ b/include/linux/clockchips.h
> >> @@ -55,6 +55,11 @@ enum clock_event_nofitiers {
> >>  #define CLOCK_EVT_FEAT_C3STOP		0x000008
> >>  #define CLOCK_EVT_FEAT_DUMMY		0x000010
> >>  
> >> +/*
> >> + * Clock event device can set its irq affinity dynamically
> >> + */
> >> +#define CLOCK_EVT_FEAT_DYNIRQ		0x000020
> >> +
> >>  /**
> >>   * struct clock_event_device - clock event device descriptor
> >>   * @event_handler:	Assigned by the framework to be called by the low
> >> diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
> >> index 6197ac0..9ca8ff5 100644
> >> --- a/kernel/time/tick-broadcast.c
> >> +++ b/kernel/time/tick-broadcast.c
> >> @@ -406,13 +406,37 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
> >>  	return to_cpumask(tick_broadcast_oneshot_mask);
> >>  }
> >>  
> >> -static int tick_broadcast_set_event(struct clock_event_device *bc,
> >> +/*
> >> + * Set broadcast interrupt affinity
> >> + */
> >> +static void tick_broadcast_set_affinity(struct clock_event_device *bc,
> >> +					const struct cpumask *cpumask)
> >> +{
> >> +	if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
> >> +		return;
> >> +
> >> +	if (cpumask_equal(bc->cpumask, cpumask))
> >> +		return;
> >> +
> >> +	bc->cpumask = cpumask;
> > 
> > This breaks with CONFIG_CPUMASK_OFFSTACK=y. cpumask_copy() is your friend!
> 
> This instruction copies the pointer, not the cpumask content.
> 
> bc->cpumask is defined as a const struct cpumask * and is used to copy a
> cpumask pointer not the content.
> 
> The cpumask parameter is a pointer to a global cpumask provided by the
> cpumask_of macro.
> 
> But to be in the safe side, I compiled tested with
> CONFIG_CPUMASK_OFFSTACK=y without problem.
> 
> Did I missed something ?

No, I misinterpreted the patch. Assigning a pointer is safe. 

Thanks,

	tglx

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

* Re: [PATCH 2/4][V2] time : set broadcast irq affinity
  2013-03-06  9:48         ` Thomas Gleixner
@ 2013-03-06 12:35           ` Daniel Lezcano
  -1 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-06 12:35 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: john.stultz, viresh.kumar, jacob.jun.pan, linux-arm-kernel,
	santosh.shilimkar, linux-pm, linux-kernel, linaro-kernel,
	patches, rickard.andersson, vincent.guittot, linus.walleij

On 03/06/2013 10:48 AM, Thomas Gleixner wrote:
> On Wed, 6 Mar 2013, Daniel Lezcano wrote:
>> On 03/05/2013 09:40 PM, Thomas Gleixner wrote:
>>> On Sat, 2 Mar 2013, Daniel Lezcano wrote:
>>>> When a cpu goes to a deep idle state where its local timer is shutdown,
>>>> it notifies the time frame work to use the broadcast timer instead.
>>>>
>>>> Unfortunately, the broadcast device could wake up any CPU, including an
>>>> idle one which is not concerned by the wake up at all.
>>>>
>>>> This implies, in the worst case, an idle CPU will wake up to send an IPI
>>>> to another idle cpu.
>>>>
>>>> This patch solves this by setting the irq affinity to the cpu concerned
>>>> by the nearest timer event, by this way, the CPU which is wake up is
>>>> guarantee to be the one concerned by the next event and we are safe with
>>>> unnecessary wakeup for another idle CPU.
>>>>
>>>> As the irq affinity is not supported by all the archs, a flag is needed
>>>> to specify which clocksource can handle it : CLOCK_EVT_FEAT_DYNIRQ
>>>>
>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>> ---
>>>>  include/linux/clockchips.h   |    5 +++++
>>>>  kernel/time/tick-broadcast.c |   40 +++++++++++++++++++++++++++++++++-------
>>>>  2 files changed, 38 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
>>>> index 6634652..c93e2a6 100644
>>>> --- a/include/linux/clockchips.h
>>>> +++ b/include/linux/clockchips.h
>>>> @@ -55,6 +55,11 @@ enum clock_event_nofitiers {
>>>>  #define CLOCK_EVT_FEAT_C3STOP		0x000008
>>>>  #define CLOCK_EVT_FEAT_DUMMY		0x000010
>>>>  
>>>> +/*
>>>> + * Clock event device can set its irq affinity dynamically
>>>> + */
>>>> +#define CLOCK_EVT_FEAT_DYNIRQ		0x000020
>>>> +
>>>>  /**
>>>>   * struct clock_event_device - clock event device descriptor
>>>>   * @event_handler:	Assigned by the framework to be called by the low
>>>> diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
>>>> index 6197ac0..9ca8ff5 100644
>>>> --- a/kernel/time/tick-broadcast.c
>>>> +++ b/kernel/time/tick-broadcast.c
>>>> @@ -406,13 +406,37 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
>>>>  	return to_cpumask(tick_broadcast_oneshot_mask);
>>>>  }
>>>>  
>>>> -static int tick_broadcast_set_event(struct clock_event_device *bc,
>>>> +/*
>>>> + * Set broadcast interrupt affinity
>>>> + */
>>>> +static void tick_broadcast_set_affinity(struct clock_event_device *bc,
>>>> +					const struct cpumask *cpumask)
>>>> +{
>>>> +	if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
>>>> +		return;
>>>> +
>>>> +	if (cpumask_equal(bc->cpumask, cpumask))
>>>> +		return;
>>>> +
>>>> +	bc->cpumask = cpumask;
>>>
>>> This breaks with CONFIG_CPUMASK_OFFSTACK=y. cpumask_copy() is your friend!
>>
>> This instruction copies the pointer, not the cpumask content.
>>
>> bc->cpumask is defined as a const struct cpumask * and is used to copy a
>> cpumask pointer not the content.
>>
>> The cpumask parameter is a pointer to a global cpumask provided by the
>> cpumask_of macro.
>>
>> But to be in the safe side, I compiled tested with
>> CONFIG_CPUMASK_OFFSTACK=y without problem.
>>
>> Did I missed something ?
> 
> No, I misinterpreted the patch. Assigning a pointer is safe. 

Ok, thanks anyway for reviewing the patch.

Do you think it is acceptable for upstreaming ?

  -- Daniel

 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* [PATCH 2/4][V2] time : set broadcast irq affinity
@ 2013-03-06 12:35           ` Daniel Lezcano
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-06 12:35 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/06/2013 10:48 AM, Thomas Gleixner wrote:
> On Wed, 6 Mar 2013, Daniel Lezcano wrote:
>> On 03/05/2013 09:40 PM, Thomas Gleixner wrote:
>>> On Sat, 2 Mar 2013, Daniel Lezcano wrote:
>>>> When a cpu goes to a deep idle state where its local timer is shutdown,
>>>> it notifies the time frame work to use the broadcast timer instead.
>>>>
>>>> Unfortunately, the broadcast device could wake up any CPU, including an
>>>> idle one which is not concerned by the wake up at all.
>>>>
>>>> This implies, in the worst case, an idle CPU will wake up to send an IPI
>>>> to another idle cpu.
>>>>
>>>> This patch solves this by setting the irq affinity to the cpu concerned
>>>> by the nearest timer event, by this way, the CPU which is wake up is
>>>> guarantee to be the one concerned by the next event and we are safe with
>>>> unnecessary wakeup for another idle CPU.
>>>>
>>>> As the irq affinity is not supported by all the archs, a flag is needed
>>>> to specify which clocksource can handle it : CLOCK_EVT_FEAT_DYNIRQ
>>>>
>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>> ---
>>>>  include/linux/clockchips.h   |    5 +++++
>>>>  kernel/time/tick-broadcast.c |   40 +++++++++++++++++++++++++++++++++-------
>>>>  2 files changed, 38 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
>>>> index 6634652..c93e2a6 100644
>>>> --- a/include/linux/clockchips.h
>>>> +++ b/include/linux/clockchips.h
>>>> @@ -55,6 +55,11 @@ enum clock_event_nofitiers {
>>>>  #define CLOCK_EVT_FEAT_C3STOP		0x000008
>>>>  #define CLOCK_EVT_FEAT_DUMMY		0x000010
>>>>  
>>>> +/*
>>>> + * Clock event device can set its irq affinity dynamically
>>>> + */
>>>> +#define CLOCK_EVT_FEAT_DYNIRQ		0x000020
>>>> +
>>>>  /**
>>>>   * struct clock_event_device - clock event device descriptor
>>>>   * @event_handler:	Assigned by the framework to be called by the low
>>>> diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
>>>> index 6197ac0..9ca8ff5 100644
>>>> --- a/kernel/time/tick-broadcast.c
>>>> +++ b/kernel/time/tick-broadcast.c
>>>> @@ -406,13 +406,37 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
>>>>  	return to_cpumask(tick_broadcast_oneshot_mask);
>>>>  }
>>>>  
>>>> -static int tick_broadcast_set_event(struct clock_event_device *bc,
>>>> +/*
>>>> + * Set broadcast interrupt affinity
>>>> + */
>>>> +static void tick_broadcast_set_affinity(struct clock_event_device *bc,
>>>> +					const struct cpumask *cpumask)
>>>> +{
>>>> +	if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
>>>> +		return;
>>>> +
>>>> +	if (cpumask_equal(bc->cpumask, cpumask))
>>>> +		return;
>>>> +
>>>> +	bc->cpumask = cpumask;
>>>
>>> This breaks with CONFIG_CPUMASK_OFFSTACK=y. cpumask_copy() is your friend!
>>
>> This instruction copies the pointer, not the cpumask content.
>>
>> bc->cpumask is defined as a const struct cpumask * and is used to copy a
>> cpumask pointer not the content.
>>
>> The cpumask parameter is a pointer to a global cpumask provided by the
>> cpumask_of macro.
>>
>> But to be in the safe side, I compiled tested with
>> CONFIG_CPUMASK_OFFSTACK=y without problem.
>>
>> Did I missed something ?
> 
> No, I misinterpreted the patch. Assigning a pointer is safe. 

Ok, thanks anyway for reviewing the patch.

Do you think it is acceptable for upstreaming ?

  -- Daniel

 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

* [tip:timers/core] tick: Pass broadcast device to tick_broadcast_set_event()
  2013-03-02 10:10   ` Daniel Lezcano
  (?)
  (?)
@ 2013-03-07 16:31   ` tip-bot for Daniel Lezcano
  -1 siblings, 0 replies; 39+ messages in thread
From: tip-bot for Daniel Lezcano @ 2013-03-07 16:31 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, daniel.lezcano

Commit-ID:  f9ae39d04ccdec8d8ecf532191b7056c279a22c0
Gitweb:     http://git.kernel.org/tip/f9ae39d04ccdec8d8ecf532191b7056c279a22c0
Author:     Daniel Lezcano <daniel.lezcano@linaro.org>
AuthorDate: Sat, 2 Mar 2013 11:10:10 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 7 Mar 2013 16:13:26 +0100

tick: Pass broadcast device to tick_broadcast_set_event()

Pass the broadcast timer to tick_broadcast_set_event() instead of
reevaluating tick_broadcast_device.evtdev.

[ tglx: Massaged changelog ]

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: viresh.kumar@linaro.org
Cc: jacob.jun.pan@linux.intel.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: santosh.shilimkar@ti.com
Cc: linaro-kernel@lists.linaro.org
Cc: patches@linaro.org
Cc: rickard.andersson@stericsson.com
Cc: vincent.guittot@linaro.org
Cc: linus.walleij@stericsson.com
Cc: john.stultz@linaro.org
Link: http://lkml.kernel.org/r/1362219013-18173-2-git-send-email-daniel.lezcano@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/time/tick-broadcast.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 35b8875..70dd98c 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -401,10 +401,9 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
 	return tick_broadcast_oneshot_mask;
 }
 
-static int tick_broadcast_set_event(ktime_t expires, int force)
+static int tick_broadcast_set_event(struct clock_event_device *bc,
+				    ktime_t expires, int force)
 {
-	struct clock_event_device *bc = tick_broadcast_device.evtdev;
-
 	if (bc->mode != CLOCK_EVT_MODE_ONESHOT)
 		clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
 
@@ -474,7 +473,7 @@ again:
 		 * Rearm the broadcast device. If event expired,
 		 * repeat the above
 		 */
-		if (tick_broadcast_set_event(next_event, 0))
+		if (tick_broadcast_set_event(dev, next_event, 0))
 			goto again;
 	}
 	raw_spin_unlock(&tick_broadcast_lock);
@@ -516,7 +515,7 @@ void tick_broadcast_oneshot_control(unsigned long reason)
 		if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_oneshot_mask)) {
 			clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
 			if (dev->next_event.tv64 < bc->next_event.tv64)
-				tick_broadcast_set_event(dev->next_event, 1);
+				tick_broadcast_set_event(bc, dev->next_event, 1);
 		}
 	} else {
 		if (cpumask_test_and_clear_cpu(cpu, tick_broadcast_oneshot_mask)) {
@@ -582,7 +581,7 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
 			clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
 			tick_broadcast_init_next_event(tmpmask,
 						       tick_next_period);
-			tick_broadcast_set_event(tick_next_period, 1);
+			tick_broadcast_set_event(bc, tick_next_period, 1);
 		} else
 			bc->next_event.tv64 = KTIME_MAX;
 	} else {

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

* [tip:timers/core] tick: Dynamically set broadcast irq affinity
  2013-03-02 10:10   ` Daniel Lezcano
  (?)
  (?)
@ 2013-03-07 16:33   ` tip-bot for Daniel Lezcano
  -1 siblings, 0 replies; 39+ messages in thread
From: tip-bot for Daniel Lezcano @ 2013-03-07 16:33 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, tglx, daniel.lezcano

Commit-ID:  d2348fb6fdc6d671ad45b62db237f76c8c115603
Gitweb:     http://git.kernel.org/tip/d2348fb6fdc6d671ad45b62db237f76c8c115603
Author:     Daniel Lezcano <daniel.lezcano@linaro.org>
AuthorDate: Sat, 2 Mar 2013 11:10:11 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 7 Mar 2013 16:13:26 +0100

tick: Dynamically set broadcast irq affinity

When a cpu goes to a deep idle state where its local timer is
shutdown, it notifies the time frame work to use the broadcast timer
instead.  Unfortunately, the broadcast device could wake up any CPU,
including an idle one which is not concerned by the wake up at all. So
in the worst case an idle CPU will wake up to send an IPI to the CPU
whose timer expired.

Provide an opt-in feature CLOCK_EVT_FEAT_DYNIRQ which tells the core
that is should set the interrupt affinity of the broadcast interrupt
to the cpu which has the earliest expiry time. This avoids unnecessary
spurious wakeups and IPIs.

[ tglx: Adopted to cpumask rework, silenced an uninitialized warning,
  massaged changelog ]

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: viresh.kumar@linaro.org
Cc: jacob.jun.pan@linux.intel.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: santosh.shilimkar@ti.com
Cc: linaro-kernel@lists.linaro.org
Cc: patches@linaro.org
Cc: rickard.andersson@stericsson.com
Cc: vincent.guittot@linaro.org
Cc: linus.walleij@stericsson.com
Cc: john.stultz@linaro.org
Link: http://lkml.kernel.org/r/1362219013-18173-3-git-send-email-daniel.lezcano@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 include/linux/clockchips.h   |  5 +++++
 kernel/time/tick-broadcast.c | 39 +++++++++++++++++++++++++++++++--------
 2 files changed, 36 insertions(+), 8 deletions(-)

diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 6634652..494d33e 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -55,6 +55,11 @@ enum clock_event_nofitiers {
 #define CLOCK_EVT_FEAT_C3STOP		0x000008
 #define CLOCK_EVT_FEAT_DUMMY		0x000010
 
+/*
+ * Core shall set the interrupt affinity dynamically in broadcast mode
+ */
+#define CLOCK_EVT_FEAT_DYNIRQ		0x000020
+
 /**
  * struct clock_event_device - clock event device descriptor
  * @event_handler:	Assigned by the framework to be called by the low
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 70dd98c..380910d 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -401,13 +401,34 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
 	return tick_broadcast_oneshot_mask;
 }
 
-static int tick_broadcast_set_event(struct clock_event_device *bc,
+/*
+ * Set broadcast interrupt affinity
+ */
+static void tick_broadcast_set_affinity(struct clock_event_device *bc,
+					const struct cpumask *cpumask)
+{
+	if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
+		return;
+
+	if (cpumask_equal(bc->cpumask, cpumask))
+		return;
+
+	bc->cpumask = cpumask;
+	irq_set_affinity(bc->irq, bc->cpumask);
+}
+
+static int tick_broadcast_set_event(struct clock_event_device *bc, int cpu,
 				    ktime_t expires, int force)
 {
+	int ret;
+
 	if (bc->mode != CLOCK_EVT_MODE_ONESHOT)
 		clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
 
-	return clockevents_program_event(bc, expires, force);
+	ret = clockevents_program_event(bc, expires, force);
+	if (!ret)
+		tick_broadcast_set_affinity(bc, cpumask_of(cpu));
+	return ret;
 }
 
 int tick_resume_broadcast_oneshot(struct clock_event_device *bc)
@@ -436,7 +457,7 @@ static void tick_handle_oneshot_broadcast(struct clock_event_device *dev)
 {
 	struct tick_device *td;
 	ktime_t now, next_event;
-	int cpu;
+	int cpu, next_cpu = 0;
 
 	raw_spin_lock(&tick_broadcast_lock);
 again:
@@ -447,10 +468,12 @@ again:
 	/* Find all expired events */
 	for_each_cpu(cpu, tick_broadcast_oneshot_mask) {
 		td = &per_cpu(tick_cpu_device, cpu);
-		if (td->evtdev->next_event.tv64 <= now.tv64)
+		if (td->evtdev->next_event.tv64 <= now.tv64) {
 			cpumask_set_cpu(cpu, tmpmask);
-		else if (td->evtdev->next_event.tv64 < next_event.tv64)
+		} else if (td->evtdev->next_event.tv64 < next_event.tv64) {
 			next_event.tv64 = td->evtdev->next_event.tv64;
+			next_cpu = cpu;
+		}
 	}
 
 	/*
@@ -473,7 +496,7 @@ again:
 		 * Rearm the broadcast device. If event expired,
 		 * repeat the above
 		 */
-		if (tick_broadcast_set_event(dev, next_event, 0))
+		if (tick_broadcast_set_event(dev, next_cpu, next_event, 0))
 			goto again;
 	}
 	raw_spin_unlock(&tick_broadcast_lock);
@@ -515,7 +538,7 @@ void tick_broadcast_oneshot_control(unsigned long reason)
 		if (!cpumask_test_and_set_cpu(cpu, tick_broadcast_oneshot_mask)) {
 			clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
 			if (dev->next_event.tv64 < bc->next_event.tv64)
-				tick_broadcast_set_event(bc, dev->next_event, 1);
+				tick_broadcast_set_event(bc, cpu, dev->next_event, 1);
 		}
 	} else {
 		if (cpumask_test_and_clear_cpu(cpu, tick_broadcast_oneshot_mask)) {
@@ -581,7 +604,7 @@ void tick_broadcast_setup_oneshot(struct clock_event_device *bc)
 			clockevents_set_mode(bc, CLOCK_EVT_MODE_ONESHOT);
 			tick_broadcast_init_next_event(tmpmask,
 						       tick_next_period);
-			tick_broadcast_set_event(bc, tick_next_period, 1);
+			tick_broadcast_set_event(bc, cpu, tick_next_period, 1);
 		} else
 			bc->next_event.tv64 = KTIME_MAX;
 	} else {

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

* Re: [PATCH 2/4][V2] time : set broadcast irq affinity
  2013-03-06  9:48         ` Thomas Gleixner
@ 2013-03-08  4:38           ` Daniel Lezcano
  -1 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-08  4:38 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: john.stultz, viresh.kumar, jacob.jun.pan, linux-arm-kernel,
	santosh.shilimkar, linux-pm, linux-kernel, linaro-kernel,
	patches, rickard.andersson, vincent.guittot, linus.walleij

On 03/06/2013 10:48 AM, Thomas Gleixner wrote:
> On Wed, 6 Mar 2013, Daniel Lezcano wrote:
>> On 03/05/2013 09:40 PM, Thomas Gleixner wrote:
>>> On Sat, 2 Mar 2013, Daniel Lezcano wrote:
>>>> When a cpu goes to a deep idle state where its local timer is shutdown,
>>>> it notifies the time frame work to use the broadcast timer instead.
>>>>
>>>> Unfortunately, the broadcast device could wake up any CPU, including an
>>>> idle one which is not concerned by the wake up at all.
>>>>
>>>> This implies, in the worst case, an idle CPU will wake up to send an IPI
>>>> to another idle cpu.
>>>>
>>>> This patch solves this by setting the irq affinity to the cpu concerned
>>>> by the nearest timer event, by this way, the CPU which is wake up is
>>>> guarantee to be the one concerned by the next event and we are safe with
>>>> unnecessary wakeup for another idle CPU.
>>>>
>>>> As the irq affinity is not supported by all the archs, a flag is needed
>>>> to specify which clocksource can handle it : CLOCK_EVT_FEAT_DYNIRQ
>>>>
>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>> ---
>>>>  include/linux/clockchips.h   |    5 +++++
>>>>  kernel/time/tick-broadcast.c |   40 +++++++++++++++++++++++++++++++++-------
>>>>  2 files changed, 38 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
>>>> index 6634652..c93e2a6 100644
>>>> --- a/include/linux/clockchips.h
>>>> +++ b/include/linux/clockchips.h
>>>> @@ -55,6 +55,11 @@ enum clock_event_nofitiers {
>>>>  #define CLOCK_EVT_FEAT_C3STOP		0x000008
>>>>  #define CLOCK_EVT_FEAT_DUMMY		0x000010
>>>>  
>>>> +/*
>>>> + * Clock event device can set its irq affinity dynamically
>>>> + */
>>>> +#define CLOCK_EVT_FEAT_DYNIRQ		0x000020
>>>> +
>>>>  /**
>>>>   * struct clock_event_device - clock event device descriptor
>>>>   * @event_handler:	Assigned by the framework to be called by the low
>>>> diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
>>>> index 6197ac0..9ca8ff5 100644
>>>> --- a/kernel/time/tick-broadcast.c
>>>> +++ b/kernel/time/tick-broadcast.c
>>>> @@ -406,13 +406,37 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
>>>>  	return to_cpumask(tick_broadcast_oneshot_mask);
>>>>  }
>>>>  
>>>> -static int tick_broadcast_set_event(struct clock_event_device *bc,
>>>> +/*
>>>> + * Set broadcast interrupt affinity
>>>> + */
>>>> +static void tick_broadcast_set_affinity(struct clock_event_device *bc,
>>>> +					const struct cpumask *cpumask)
>>>> +{
>>>> +	if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
>>>> +		return;
>>>> +
>>>> +	if (cpumask_equal(bc->cpumask, cpumask))
>>>> +		return;
>>>> +
>>>> +	bc->cpumask = cpumask;
>>>
>>> This breaks with CONFIG_CPUMASK_OFFSTACK=y. cpumask_copy() is your friend!
>>
>> This instruction copies the pointer, not the cpumask content.
>>
>> bc->cpumask is defined as a const struct cpumask * and is used to copy a
>> cpumask pointer not the content.
>>
>> The cpumask parameter is a pointer to a global cpumask provided by the
>> cpumask_of macro.
>>
>> But to be in the safe side, I compiled tested with
>> CONFIG_CPUMASK_OFFSTACK=y without problem.


Hi Thomas,

thanks for merging the patch 1 and 2.

I was wondering if it would be possible to take the 3/4 and 4/4
otherwise the flag dependency will prevent to send those to the
maintainer's tree until they gain visibility on it.


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* [PATCH 2/4][V2] time : set broadcast irq affinity
@ 2013-03-08  4:38           ` Daniel Lezcano
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-08  4:38 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/06/2013 10:48 AM, Thomas Gleixner wrote:
> On Wed, 6 Mar 2013, Daniel Lezcano wrote:
>> On 03/05/2013 09:40 PM, Thomas Gleixner wrote:
>>> On Sat, 2 Mar 2013, Daniel Lezcano wrote:
>>>> When a cpu goes to a deep idle state where its local timer is shutdown,
>>>> it notifies the time frame work to use the broadcast timer instead.
>>>>
>>>> Unfortunately, the broadcast device could wake up any CPU, including an
>>>> idle one which is not concerned by the wake up at all.
>>>>
>>>> This implies, in the worst case, an idle CPU will wake up to send an IPI
>>>> to another idle cpu.
>>>>
>>>> This patch solves this by setting the irq affinity to the cpu concerned
>>>> by the nearest timer event, by this way, the CPU which is wake up is
>>>> guarantee to be the one concerned by the next event and we are safe with
>>>> unnecessary wakeup for another idle CPU.
>>>>
>>>> As the irq affinity is not supported by all the archs, a flag is needed
>>>> to specify which clocksource can handle it : CLOCK_EVT_FEAT_DYNIRQ
>>>>
>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>> ---
>>>>  include/linux/clockchips.h   |    5 +++++
>>>>  kernel/time/tick-broadcast.c |   40 +++++++++++++++++++++++++++++++++-------
>>>>  2 files changed, 38 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
>>>> index 6634652..c93e2a6 100644
>>>> --- a/include/linux/clockchips.h
>>>> +++ b/include/linux/clockchips.h
>>>> @@ -55,6 +55,11 @@ enum clock_event_nofitiers {
>>>>  #define CLOCK_EVT_FEAT_C3STOP		0x000008
>>>>  #define CLOCK_EVT_FEAT_DUMMY		0x000010
>>>>  
>>>> +/*
>>>> + * Clock event device can set its irq affinity dynamically
>>>> + */
>>>> +#define CLOCK_EVT_FEAT_DYNIRQ		0x000020
>>>> +
>>>>  /**
>>>>   * struct clock_event_device - clock event device descriptor
>>>>   * @event_handler:	Assigned by the framework to be called by the low
>>>> diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
>>>> index 6197ac0..9ca8ff5 100644
>>>> --- a/kernel/time/tick-broadcast.c
>>>> +++ b/kernel/time/tick-broadcast.c
>>>> @@ -406,13 +406,37 @@ struct cpumask *tick_get_broadcast_oneshot_mask(void)
>>>>  	return to_cpumask(tick_broadcast_oneshot_mask);
>>>>  }
>>>>  
>>>> -static int tick_broadcast_set_event(struct clock_event_device *bc,
>>>> +/*
>>>> + * Set broadcast interrupt affinity
>>>> + */
>>>> +static void tick_broadcast_set_affinity(struct clock_event_device *bc,
>>>> +					const struct cpumask *cpumask)
>>>> +{
>>>> +	if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ))
>>>> +		return;
>>>> +
>>>> +	if (cpumask_equal(bc->cpumask, cpumask))
>>>> +		return;
>>>> +
>>>> +	bc->cpumask = cpumask;
>>>
>>> This breaks with CONFIG_CPUMASK_OFFSTACK=y. cpumask_copy() is your friend!
>>
>> This instruction copies the pointer, not the cpumask content.
>>
>> bc->cpumask is defined as a const struct cpumask * and is used to copy a
>> cpumask pointer not the content.
>>
>> The cpumask parameter is a pointer to a global cpumask provided by the
>> cpumask_of macro.
>>
>> But to be in the safe side, I compiled tested with
>> CONFIG_CPUMASK_OFFSTACK=y without problem.


Hi Thomas,

thanks for merging the patch 1 and 2.

I was wondering if it would be possible to take the 3/4 and 4/4
otherwise the flag dependency will prevent to send those to the
maintainer's tree until they gain visibility on it.


-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

* Re: [PATCH 2/4][V2] time : set broadcast irq affinity
  2013-03-08  4:38           ` Daniel Lezcano
@ 2013-03-08  7:20             ` Thomas Gleixner
  -1 siblings, 0 replies; 39+ messages in thread
From: Thomas Gleixner @ 2013-03-08  7:20 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: john.stultz, viresh.kumar, jacob.jun.pan, LAK, santosh.shilimkar,
	linux-pm, LKML, linaro-kernel, patches, rickard.andersson,
	vincent.guittot, linus.walleij, Arnd Bergmann

On Fri, 8 Mar 2013, Daniel Lezcano wrote:
> On 03/06/2013 10:48 AM, Thomas Gleixner wrote:
> I was wondering if it would be possible to take the 3/4 and 4/4
> otherwise the flag dependency will prevent to send those to the
> maintainer's tree until they gain visibility on it.

I can take them with the ack of arm soc folks.

Thanks,

	tglx

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

* [PATCH 2/4][V2] time : set broadcast irq affinity
@ 2013-03-08  7:20             ` Thomas Gleixner
  0 siblings, 0 replies; 39+ messages in thread
From: Thomas Gleixner @ 2013-03-08  7:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 8 Mar 2013, Daniel Lezcano wrote:
> On 03/06/2013 10:48 AM, Thomas Gleixner wrote:
> I was wondering if it would be possible to take the 3/4 and 4/4
> otherwise the flag dependency will prevent to send those to the
> maintainer's tree until they gain visibility on it.

I can take them with the ack of arm soc folks.

Thanks,

	tglx

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

* [PATCH 3/4][V2] ARM: nomadik: add dynamic irq flag to the timer
  2013-03-02 10:10 ` Daniel Lezcano
@ 2013-03-08 15:17   ` Daniel Lezcano
  -1 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-08 15:17 UTC (permalink / raw)
  To: john.stultz, tglx, linus.walleij
  Cc: viresh.kumar, jacob.jun.pan, linux-arm-kernel, santosh.shilimkar,
	linux-pm, linux-kernel, linaro-kernel, patches,
	rickard.andersson, vincent.guittot

[-- Attachment #1: Type: text/plain, Size: 1356 bytes --]

> Add the dynamic irq affinity feature to the timer clock device.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
> Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
> ---

Hi Linus,

AFAIU, you are ok with this patch, Rickard acked it and Vincent reviewed it.

Thomas agreed to merge it into its tree as I requested because we will
need to wait for your tree to gain visibility to this new flag before
submitting this patch, which can take awhile.

Could you please ack it if it is ok for you ?

Thanks
  -- Daniel

> 
> 
>  drivers/clocksource/nomadik-mtu.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/nomadik-mtu.c b/drivers/clocksource/nomadik-mtu.c
> index 7cbcaa0..73dc540 100644
> --- a/drivers/clocksource/nomadik-mtu.c
> +++ b/drivers/clocksource/nomadik-mtu.c
> @@ -136,7 +136,8 @@ static void nmdk_clkevt_mode(enum clock_event_mode mode,
>   static struct clock_event_device nmdk_clkevt = {
>  	.name		= "mtu_1",
> -	.features	= CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_PERIODIC,
> +	.features	= CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_PERIODIC |
> +	                  CLOCK_EVT_FEAT_DYNIRQ,
>  	.rating		= 200,
>  	.set_mode	= nmdk_clkevt_mode,
>  	.set_next_event	= nmdk_clkevt_next,
> -- 
> 1.7.9.5


[-- Attachment #2: Attached Message Part --]
[-- Type: text/plain, Size: 0 bytes --]



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

* [PATCH 3/4][V2] ARM: nomadik: add dynamic irq flag to the timer
@ 2013-03-08 15:17   ` Daniel Lezcano
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-08 15:17 UTC (permalink / raw)
  To: linux-arm-kernel

> Add the dynamic irq affinity feature to the timer clock device.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
> Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
> ---

Hi Linus,

AFAIU, you are ok with this patch, Rickard acked it and Vincent reviewed it.

Thomas agreed to merge it into its tree as I requested because we will
need to wait for your tree to gain visibility to this new flag before
submitting this patch, which can take awhile.

Could you please ack it if it is ok for you ?

Thanks
  -- Daniel

> 
> 
>  drivers/clocksource/nomadik-mtu.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/nomadik-mtu.c b/drivers/clocksource/nomadik-mtu.c
> index 7cbcaa0..73dc540 100644
> --- a/drivers/clocksource/nomadik-mtu.c
> +++ b/drivers/clocksource/nomadik-mtu.c
> @@ -136,7 +136,8 @@ static void nmdk_clkevt_mode(enum clock_event_mode mode,
>   static struct clock_event_device nmdk_clkevt = {
>  	.name		= "mtu_1",
> -	.features	= CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_PERIODIC,
> +	.features	= CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_PERIODIC |
> +	                  CLOCK_EVT_FEAT_DYNIRQ,
>  	.rating		= 200,
>  	.set_mode	= nmdk_clkevt_mode,
>  	.set_next_event	= nmdk_clkevt_next,
> -- 
> 1.7.9.5

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

* Re: [PATCH 4/4][V2] ARM: timer-sp: Set dynamic irq affinity
  2013-03-02 10:10   ` Daniel Lezcano
@ 2013-03-08 15:28     ` Daniel Lezcano
  -1 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-08 15:28 UTC (permalink / raw)
  To: john.stultz, tglx, Russell King - ARM Linux
  Cc: viresh.kumar, jacob.jun.pan, linux-arm-kernel, santosh.shilimkar,
	linux-pm, linux-kernel, linaro-kernel, patches,
	rickard.andersson, vincent.guittot, linus.walleij

On 03/02/2013 11:10 AM, Daniel Lezcano wrote:
> From: Viresh Kumar <viresh.kumar@linaro.org>
> 
> When a cpu goes to a deep idle state where its local timer is shutdown, it
> notifies the time frame work to use the broadcast timer instead.
> 
> Unfortunately, the broadcast device could wake up any CPU, including an idle one
> which is not concerned by the wake up at all.
> 
> This implies, in the worst case, an idle CPU will wake up to send an IPI to
> another idle cpu.
> 
> This patch fixes this for ARM platforms using timer-sp, by setting
> CLOCK_EVT_FEAT_DYNIRQ feature.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---

Hi Russell,

I asked Thomas if he could take this patch in its tree but it falls
under your umbrella. Thomas agreed to take it if you ack this patch.

Is this patch acceptable for you ?

Thanks in advance
  -- Daniel


>  arch/arm/common/timer-sp.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
> index 9d2d3ba..ae3c0f9 100644
> --- a/arch/arm/common/timer-sp.c
> +++ b/arch/arm/common/timer-sp.c
> @@ -158,7 +158,8 @@ static int sp804_set_next_event(unsigned long next,
>  }
>  
>  static struct clock_event_device sp804_clockevent = {
> -	.features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
> +	.features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT |
> +		CLOCK_EVT_FEAT_DYNIRQ,
>  	.set_mode	= sp804_set_mode,
>  	.set_next_event	= sp804_set_next_event,
>  	.rating		= 300,
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* [PATCH 4/4][V2] ARM: timer-sp: Set dynamic irq affinity
@ 2013-03-08 15:28     ` Daniel Lezcano
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-08 15:28 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/02/2013 11:10 AM, Daniel Lezcano wrote:
> From: Viresh Kumar <viresh.kumar@linaro.org>
> 
> When a cpu goes to a deep idle state where its local timer is shutdown, it
> notifies the time frame work to use the broadcast timer instead.
> 
> Unfortunately, the broadcast device could wake up any CPU, including an idle one
> which is not concerned by the wake up at all.
> 
> This implies, in the worst case, an idle CPU will wake up to send an IPI to
> another idle cpu.
> 
> This patch fixes this for ARM platforms using timer-sp, by setting
> CLOCK_EVT_FEAT_DYNIRQ feature.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---

Hi Russell,

I asked Thomas if he could take this patch in its tree but it falls
under your umbrella. Thomas agreed to take it if you ack this patch.

Is this patch acceptable for you ?

Thanks in advance
  -- Daniel


>  arch/arm/common/timer-sp.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
> index 9d2d3ba..ae3c0f9 100644
> --- a/arch/arm/common/timer-sp.c
> +++ b/arch/arm/common/timer-sp.c
> @@ -158,7 +158,8 @@ static int sp804_set_next_event(unsigned long next,
>  }
>  
>  static struct clock_event_device sp804_clockevent = {
> -	.features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
> +	.features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT |
> +		CLOCK_EVT_FEAT_DYNIRQ,
>  	.set_mode	= sp804_set_mode,
>  	.set_next_event	= sp804_set_next_event,
>  	.rating		= 300,
> 


-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

* Re: [PATCH 3/4][V2] ARM: nomadik: add dynamic irq flag to the timer
  2013-03-08 15:17   ` Daniel Lezcano
@ 2013-03-08 16:03     ` Thomas Gleixner
  -1 siblings, 0 replies; 39+ messages in thread
From: Thomas Gleixner @ 2013-03-08 16:03 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: john.stultz, linus.walleij, viresh.kumar, jacob.jun.pan,
	linux-arm-kernel, santosh.shilimkar, linux-pm, linux-kernel,
	linaro-kernel, patches, rickard.andersson, vincent.guittot

On Fri, 8 Mar 2013, Daniel Lezcano wrote:

> > Add the dynamic irq affinity feature to the timer clock device.
> > 
> > Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> > Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
> > Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
> > ---
> 
> Hi Linus,
> 
> AFAIU, you are ok with this patch, Rickard acked it and Vincent reviewed it.
> 
> Thomas agreed to merge it into its tree as I requested because we will
> need to wait for your tree to gain visibility to this new flag before
> submitting this patch, which can take awhile.
> 
> Could you please ack it if it is ok for you ?

I can provide a for-arm tree to pull as well. Either way fine with me.

Thanks,

	tglx

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

* [PATCH 3/4][V2] ARM: nomadik: add dynamic irq flag to the timer
@ 2013-03-08 16:03     ` Thomas Gleixner
  0 siblings, 0 replies; 39+ messages in thread
From: Thomas Gleixner @ 2013-03-08 16:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 8 Mar 2013, Daniel Lezcano wrote:

> > Add the dynamic irq affinity feature to the timer clock device.
> > 
> > Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> > Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
> > Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
> > ---
> 
> Hi Linus,
> 
> AFAIU, you are ok with this patch, Rickard acked it and Vincent reviewed it.
> 
> Thomas agreed to merge it into its tree as I requested because we will
> need to wait for your tree to gain visibility to this new flag before
> submitting this patch, which can take awhile.
> 
> Could you please ack it if it is ok for you ?

I can provide a for-arm tree to pull as well. Either way fine with me.

Thanks,

	tglx

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

* Re: [PATCH 4/4][V2] ARM: timer-sp: Set dynamic irq affinity
  2013-03-08 15:28     ` Daniel Lezcano
@ 2013-03-11 16:22       ` Russell King - ARM Linux
  -1 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2013-03-11 16:22 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: john.stultz, tglx, viresh.kumar, jacob.jun.pan, linux-arm-kernel,
	santosh.shilimkar, linux-pm, linux-kernel, linaro-kernel,
	patches, rickard.andersson, vincent.guittot, linus.walleij

On Fri, Mar 08, 2013 at 04:28:55PM +0100, Daniel Lezcano wrote:
> On 03/02/2013 11:10 AM, Daniel Lezcano wrote:
> > From: Viresh Kumar <viresh.kumar@linaro.org>
> > 
> > When a cpu goes to a deep idle state where its local timer is shutdown, it
> > notifies the time frame work to use the broadcast timer instead.
> > 
> > Unfortunately, the broadcast device could wake up any CPU, including an idle one
> > which is not concerned by the wake up at all.
> > 
> > This implies, in the worst case, an idle CPU will wake up to send an IPI to
> > another idle cpu.
> > 
> > This patch fixes this for ARM platforms using timer-sp, by setting
> > CLOCK_EVT_FEAT_DYNIRQ feature.
> > 
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> > ---
> 
> Hi Russell,
> 
> I asked Thomas if he could take this patch in its tree but it falls
> under your umbrella. Thomas agreed to take it if you ack this patch.
> 
> Is this patch acceptable for you ?

It's simple enough.

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>

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

* [PATCH 4/4][V2] ARM: timer-sp: Set dynamic irq affinity
@ 2013-03-11 16:22       ` Russell King - ARM Linux
  0 siblings, 0 replies; 39+ messages in thread
From: Russell King - ARM Linux @ 2013-03-11 16:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Mar 08, 2013 at 04:28:55PM +0100, Daniel Lezcano wrote:
> On 03/02/2013 11:10 AM, Daniel Lezcano wrote:
> > From: Viresh Kumar <viresh.kumar@linaro.org>
> > 
> > When a cpu goes to a deep idle state where its local timer is shutdown, it
> > notifies the time frame work to use the broadcast timer instead.
> > 
> > Unfortunately, the broadcast device could wake up any CPU, including an idle one
> > which is not concerned by the wake up at all.
> > 
> > This implies, in the worst case, an idle CPU will wake up to send an IPI to
> > another idle cpu.
> > 
> > This patch fixes this for ARM platforms using timer-sp, by setting
> > CLOCK_EVT_FEAT_DYNIRQ feature.
> > 
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> > ---
> 
> Hi Russell,
> 
> I asked Thomas if he could take this patch in its tree but it falls
> under your umbrella. Thomas agreed to take it if you ack this patch.
> 
> Is this patch acceptable for you ?

It's simple enough.

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>

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

* Re: [PATCH 2/4][V2] time : set broadcast irq affinity
  2013-03-08  7:20             ` Thomas Gleixner
@ 2013-03-11 21:00               ` Arnd Bergmann
  -1 siblings, 0 replies; 39+ messages in thread
From: Arnd Bergmann @ 2013-03-11 21:00 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Daniel Lezcano, john.stultz, viresh.kumar, jacob.jun.pan, LAK,
	santosh.shilimkar, linux-pm, LKML, linaro-kernel, patches,
	rickard.andersson, vincent.guittot, linus.walleij

On Friday 08 March 2013, Thomas Gleixner wrote:
> On Fri, 8 Mar 2013, Daniel Lezcano wrote:
> > On 03/06/2013 10:48 AM, Thomas Gleixner wrote:
> > I was wondering if it would be possible to take the 3/4 and 4/4
> > otherwise the flag dependency will prevent to send those to the
> > maintainer's tree until they gain visibility on it.
> 
> I can take them with the ack of arm soc folks.

Sounds good,

Acked-by: Arnd Bergmann <arnd@arndb.de>

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

* [PATCH 2/4][V2] time : set broadcast irq affinity
@ 2013-03-11 21:00               ` Arnd Bergmann
  0 siblings, 0 replies; 39+ messages in thread
From: Arnd Bergmann @ 2013-03-11 21:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 08 March 2013, Thomas Gleixner wrote:
> On Fri, 8 Mar 2013, Daniel Lezcano wrote:
> > On 03/06/2013 10:48 AM, Thomas Gleixner wrote:
> > I was wondering if it would be possible to take the 3/4 and 4/4
> > otherwise the flag dependency will prevent to send those to the
> > maintainer's tree until they gain visibility on it.
> 
> I can take them with the ack of arm soc folks.

Sounds good,

Acked-by: Arnd Bergmann <arnd@arndb.de>

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

* Re: [PATCH 3/4][V2] ARM: nomadik: add dynamic irq flag to the timer
  2013-03-08 15:17   ` Daniel Lezcano
@ 2013-03-12 11:38     ` Linus Walleij
  -1 siblings, 0 replies; 39+ messages in thread
From: Linus Walleij @ 2013-03-12 11:38 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: john.stultz, tglx, linus.walleij, viresh.kumar, jacob.jun.pan,
	linux-arm-kernel, santosh.shilimkar, linux-pm, linux-kernel,
	linaro-kernel, patches, rickard.andersson, vincent.guittot

On Fri, Mar 8, 2013 at 4:17 PM, Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>> Add the dynamic irq affinity feature to the timer clock device.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
>> Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
>> ---
>
> Hi Linus,
>
> AFAIU, you are ok with this patch, Rickard acked it and Vincent reviewed it.
>
> Thomas agreed to merge it into its tree as I requested because we will
> need to wait for your tree to gain visibility to this new flag before
> submitting this patch, which can take awhile.
>
> Could you please ack it if it is ok for you ?

Oh of course!
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* [PATCH 3/4][V2] ARM: nomadik: add dynamic irq flag to the timer
@ 2013-03-12 11:38     ` Linus Walleij
  0 siblings, 0 replies; 39+ messages in thread
From: Linus Walleij @ 2013-03-12 11:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Mar 8, 2013 at 4:17 PM, Daniel Lezcano
<daniel.lezcano@linaro.org> wrote:
>> Add the dynamic irq affinity feature to the timer clock device.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
>> Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
>> ---
>
> Hi Linus,
>
> AFAIU, you are ok with this patch, Rickard acked it and Vincent reviewed it.
>
> Thomas agreed to merge it into its tree as I requested because we will
> need to wait for your tree to gain visibility to this new flag before
> submitting this patch, which can take awhile.
>
> Could you please ack it if it is ok for you ?

Oh of course!
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH 3/4][V2] ARM: nomadik: add dynamic irq flag to the timer
  2013-03-08 16:03     ` Thomas Gleixner
@ 2013-03-19 11:42       ` Daniel Lezcano
  -1 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-19 11:42 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: john.stultz, linus.walleij, viresh.kumar, jacob.jun.pan,
	linux-arm-kernel, santosh.shilimkar, linux-pm, linux-kernel,
	linaro-kernel, patches, rickard.andersson, vincent.guittot,
	Russell King - ARM Linux

On 03/08/2013 05:03 PM, Thomas Gleixner wrote:
> On Fri, 8 Mar 2013, Daniel Lezcano wrote:
> 
>>> Add the dynamic irq affinity feature to the timer clock device.
>>>
>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
>>> Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
>>> ---
>>
>> Hi Linus,
>>
>> AFAIU, you are ok with this patch, Rickard acked it and Vincent reviewed it.
>>
>> Thomas agreed to merge it into its tree as I requested because we will
>> need to wait for your tree to gain visibility to this new flag before
>> submitting this patch, which can take awhile.
>>
>> Could you please ack it if it is ok for you ?
> 
> I can provide a for-arm tree to pull as well. Either way fine with me.

Hi Thomas,

the patch 3/4 and 4/4 have been acked-by the different maintainers.

I saw you created a 'for-arm' branch (thanks), but the patches 3/4 and
4/4 aren't there. Did I missed something ?

Thanks
   -- Daniel


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* [PATCH 3/4][V2] ARM: nomadik: add dynamic irq flag to the timer
@ 2013-03-19 11:42       ` Daniel Lezcano
  0 siblings, 0 replies; 39+ messages in thread
From: Daniel Lezcano @ 2013-03-19 11:42 UTC (permalink / raw)
  To: linux-arm-kernel

On 03/08/2013 05:03 PM, Thomas Gleixner wrote:
> On Fri, 8 Mar 2013, Daniel Lezcano wrote:
> 
>>> Add the dynamic irq affinity feature to the timer clock device.
>>>
>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
>>> Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
>>> ---
>>
>> Hi Linus,
>>
>> AFAIU, you are ok with this patch, Rickard acked it and Vincent reviewed it.
>>
>> Thomas agreed to merge it into its tree as I requested because we will
>> need to wait for your tree to gain visibility to this new flag before
>> submitting this patch, which can take awhile.
>>
>> Could you please ack it if it is ok for you ?
> 
> I can provide a for-arm tree to pull as well. Either way fine with me.

Hi Thomas,

the patch 3/4 and 4/4 have been acked-by the different maintainers.

I saw you created a 'for-arm' branch (thanks), but the patches 3/4 and
4/4 aren't there. Did I missed something ?

Thanks
   -- Daniel


-- 
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

end of thread, other threads:[~2013-03-19 11:42 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-02 10:10 [PATCH 0/4][V2] time: dynamic irq affinity Daniel Lezcano
2013-03-02 10:10 ` Daniel Lezcano
2013-03-02 10:10 ` [PATCH 1/4][V2] time : pass broadcast parameter Daniel Lezcano
2013-03-02 10:10   ` Daniel Lezcano
2013-03-02 10:10   ` Daniel Lezcano
2013-03-07 16:31   ` [tip:timers/core] tick: Pass broadcast device to tick_broadcast_set_event() tip-bot for Daniel Lezcano
2013-03-02 10:10 ` [PATCH 2/4][V2] time : set broadcast irq affinity Daniel Lezcano
2013-03-02 10:10   ` Daniel Lezcano
2013-03-05 20:40   ` Thomas Gleixner
2013-03-05 20:40     ` Thomas Gleixner
2013-03-06  9:27     ` Daniel Lezcano
2013-03-06  9:27       ` Daniel Lezcano
2013-03-06  9:48       ` Thomas Gleixner
2013-03-06  9:48         ` Thomas Gleixner
2013-03-06 12:35         ` Daniel Lezcano
2013-03-06 12:35           ` Daniel Lezcano
2013-03-08  4:38         ` Daniel Lezcano
2013-03-08  4:38           ` Daniel Lezcano
2013-03-08  7:20           ` Thomas Gleixner
2013-03-08  7:20             ` Thomas Gleixner
2013-03-11 21:00             ` Arnd Bergmann
2013-03-11 21:00               ` Arnd Bergmann
2013-03-07 16:33   ` [tip:timers/core] tick: Dynamically " tip-bot for Daniel Lezcano
2013-03-02 10:10 ` [PATCH 3/4][V2] ARM: nomadik: add dynamic irq flag to the timer Daniel Lezcano
2013-03-02 10:10   ` Daniel Lezcano
2013-03-02 10:10 ` [PATCH 4/4][V2] ARM: timer-sp: Set dynamic irq affinity Daniel Lezcano
2013-03-02 10:10   ` Daniel Lezcano
2013-03-08 15:28   ` Daniel Lezcano
2013-03-08 15:28     ` Daniel Lezcano
2013-03-11 16:22     ` Russell King - ARM Linux
2013-03-11 16:22       ` Russell King - ARM Linux
2013-03-08 15:17 ` [PATCH 3/4][V2] ARM: nomadik: add dynamic irq flag to the timer Daniel Lezcano
2013-03-08 15:17   ` Daniel Lezcano
2013-03-08 16:03   ` Thomas Gleixner
2013-03-08 16:03     ` Thomas Gleixner
2013-03-19 11:42     ` Daniel Lezcano
2013-03-19 11:42       ` Daniel Lezcano
2013-03-12 11:38   ` Linus Walleij
2013-03-12 11:38     ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.