diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/linux/linux-omap-pm/tick-schedc-suppress-needless-timer-reprogramming.patch | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/linux/linux-omap-pm/tick-schedc-suppress-needless-timer-reprogramming.patch')
-rw-r--r-- | recipes/linux/linux-omap-pm/tick-schedc-suppress-needless-timer-reprogramming.patch | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/recipes/linux/linux-omap-pm/tick-schedc-suppress-needless-timer-reprogramming.patch b/recipes/linux/linux-omap-pm/tick-schedc-suppress-needless-timer-reprogramming.patch new file mode 100644 index 0000000000..c5cf4ef6ef --- /dev/null +++ b/recipes/linux/linux-omap-pm/tick-schedc-suppress-needless-timer-reprogramming.patch @@ -0,0 +1,81 @@ +From: "Woodruff, Richard" <r-woodruff2@ti.com> + +In my device I get many interrupts from a high speed USB device in a very +short period of time. The system spends a lot of time reprogramming the +hardware timer which is in a slower timing domain as compared to the CPU. +This results in the CPU spending a huge amount of time waiting for the +timer posting to be done. All of this reprogramming is useless as the +wake up time has not changed. + +As measured using ETM trace this drops my reprogramming penalty from +almost 60% CPU load down to 15% during high interrupt rate. I can send +traces to show this. + + +Suppress setting of duplicate timer event when timer already stopped. +Timer programming can be very costly and can result in long cpu stall/wait +times. + +[akpm@linux-foundation.org: coding-style fixes] +Signed-off-by: Richard Woodruff <r-woodruff2@ti.com> +Cc: Thomas Gleixner <tglx@linutronix.de> + +On Wed, 24 Sep 2008 18:31:29 +0200 (CEST) Thomas Gleixner <tglx@linutronix.de> wrote: + +> No, we only fall trrough into raise_softirq() when the reprogram code +> detects that the event already expired. So you change the flow :) +> +> It does also not deal with delta_jiffies >= NEXT_TIMER_MAX_DELTA :( +> +> I have a closer look on that. + +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +--- + + kernel/time/tick-sched.c | 19 +++++++++++++------ + 1 file changed, 13 insertions(+), 6 deletions(-) + +diff -puN kernel/time/tick-sched.c~tick-schedc-suppress-needless-timer-reprogramming kernel/time/tick-sched.c +--- a/kernel/time/tick-sched.c~tick-schedc-suppress-needless-timer-reprogramming ++++ a/kernel/time/tick-sched.c +@@ -282,6 +282,17 @@ void tick_nohz_stop_sched_tick(int inidl + /* Schedule the tick, if we are at least one jiffie off */ + if ((long)delta_jiffies >= 1) { + ++ /* ++ * calculate the expiry time for the next timer wheel ++ * timer ++ */ ++ expires = ktime_add_ns(last_update, tick_period.tv64 * ++ delta_jiffies); ++ ++ /* Skip reprogram of event if its not changed */ ++ if (ts->tick_stopped && ktime_equal(expires, dev->next_event)) ++ goto out2; ++ + if (delta_jiffies > 1) + cpu_set(cpu, nohz_cpu_mask); + /* +@@ -332,12 +343,7 @@ void tick_nohz_stop_sched_tick(int inidl + goto out; + } + +- /* +- * calculate the expiry time for the next timer wheel +- * timer +- */ +- expires = ktime_add_ns(last_update, tick_period.tv64 * +- delta_jiffies); ++ /* Mark expiries */ + ts->idle_expires = expires; + + if (ts->nohz_mode == NOHZ_MODE_HIGHRES) { +@@ -356,6 +362,7 @@ void tick_nohz_stop_sched_tick(int inidl + tick_do_update_jiffies64(ktime_get()); + cpu_clear(cpu, nohz_cpu_mask); + } ++out2: + raise_softirq_irqoff(TIMER_SOFTIRQ); + out: + ts->next_jiffies = next_jiffies; +_ |