All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 2/4] linsched: add check on invoke "tick_nohz_irq_exit" in "irq_exit"
@ 2012-04-16  3:37 Michael Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Wang @ 2012-04-16  3:37 UTC (permalink / raw)
  To: LKML; +Cc: Paul Turner, Dhaval Giani

From: Michael Wang <wangyun@linux.vnet.ibm.com>

"tick_nohz_irq_exit" will make sure the tick timer reprogram correctly
after cpu enter idle.

With out this check, after the interrupt, tick timer will be enabled
even cpu is still in idle, this will cause inaccuracy if cpu do load
balance in next tick.

Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
---
 arch/linsched/kernel/irq.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/linsched/kernel/irq.c b/arch/linsched/kernel/irq.c
index a800bbd..d5d16e5 100644
--- a/arch/linsched/kernel/irq.c
+++ b/arch/linsched/kernel/irq.c
@@ -1,6 +1,7 @@
 #include <linux/interrupt.h>
 #include <asm/hardirq.h>
 #include <linux/sched.h>
+#include <linux/tick.h>

 unsigned long linsched_irq_flags = ARCH_IRQ_ENABLED;

@@ -81,6 +82,9 @@ void irq_exit(void)
 	sub_preempt_count(IRQ_EXIT_OFFSET);
 	if (!in_interrupt() && local_softirq_pending())
 		do_softirq();
+
+	if (idle_cpu(smp_processor_id()) && !in_interrupt() && !need_resched())
+		tick_nohz_irq_exit();
 }

 void local_bh_enable_ip(unsigned long ip)
-- 
1.7.1


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

* [RFC PATCH 2/4] linsched: add check on invoke tick_nohz_irq_exit() in irq_exit()
@ 2012-09-03  3:58 Michael Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Wang @ 2012-09-03  3:58 UTC (permalink / raw)
  To: LKML; +Cc: Paul Turner, Dhaval Giani, Peter Zijlstra

From: Michael Wang <wangyun@linux.vnet.ibm.com>

tick_nohz_irq_exit() will make sure the tick timer reprogram correctly
after cpu enter idle.

With out this check, after the interrupt, tick timer will be enabled
even cpu is still in idle, this will cause inaccuracy.

Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
---
 arch/linsched/kernel/irq.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/linsched/kernel/irq.c b/arch/linsched/kernel/irq.c
index 3000d47..5f88af4 100644
--- a/arch/linsched/kernel/irq.c
+++ b/arch/linsched/kernel/irq.c
@@ -2,6 +2,7 @@
 #include <asm/hardirq.h>
 #include <linux/sched.h>
 #include <linux/irq_work.h>
+#include <linux/tick.h>

 unsigned long linsched_irq_flags = ARCH_IRQ_ENABLED;

@@ -87,6 +88,9 @@ void irq_exit(void)
        sub_preempt_count(IRQ_EXIT_OFFSET);
        if (!in_interrupt() && local_softirq_pending())
                do_softirq();
+
+       if (idle_cpu(smp_processor_id()) && !in_interrupt() && !need_resched())
+               tick_nohz_irq_exit();
 }

 void local_bh_enable_ip(unsigned long ip)
--  
1.7.1


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

end of thread, other threads:[~2012-09-03  3:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16  3:37 [RFC PATCH 2/4] linsched: add check on invoke "tick_nohz_irq_exit" in "irq_exit" Michael Wang
  -- strict thread matches above, loose matches on Subject: below --
2012-09-03  3:58 [RFC PATCH 2/4] linsched: add check on invoke tick_nohz_irq_exit() in irq_exit() Michael Wang

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.