linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PowerPC: dynamic tick support
@ 2006-11-08 20:37 Sergei Shtylyov
  2007-03-16 22:09 ` Sergei Shtylyov
  0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2006-11-08 20:37 UTC (permalink / raw)
  To: tglx; +Cc: linuxppc-dev, greg.weeks

Add dynamic tick support for PowerPC.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

---
This patch is reworked against 2.6.18-hrt-dyntick2 patchset.

Known issues:
1) with 2.6.18-hrt-dyntick2, dynamic tick mode causes bootup slowdown after the
    HRT mode is entered (it seems to return to normal shortly);
2) with 2.6.18-rt7 (plus an extra patch to make it actually working :-) in the
   kernel preemption mode other than RT, that slowdown seems permanent (this
   was not happening with 2.6.18-rt6).

I don't have time to investigate now, so anybody interested is welcome to...
or I may even return to this if/when the time permits. :-)

 arch/powerpc/kernel/idle.c |    4 ++++
 1 files changed, 4 insertions(+)

Index: linux-2.6/arch/powerpc/kernel/idle.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/idle.c
+++ linux-2.6/arch/powerpc/kernel/idle.c
@@ -49,6 +49,8 @@ void cpu_idle(void)
 
 	set_thread_flag(TIF_POLLING_NRFLAG);
 	while (1) {
+		hrtimer_stop_sched_tick();
+
 		while (!need_resched() && !cpu_should_die()) {
 			ppc64_runlatch_off();
 
@@ -82,6 +84,8 @@ void cpu_idle(void)
 		ppc64_runlatch_on();
 		if (cpu_should_die())
 			cpu_die();
+
+		hrtimer_restart_sched_tick();
 		preempt_enable_no_resched();
 		schedule();
 		preempt_disable();

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

* Re: [PATCH] PowerPC: dynamic tick support
  2006-11-08 20:37 [PATCH] PowerPC: dynamic tick support Sergei Shtylyov
@ 2007-03-16 22:09 ` Sergei Shtylyov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2007-03-16 22:09 UTC (permalink / raw)
  To: tglx; +Cc: linuxppc-dev, greg.weeks

Hello, I wrote:

> Add dynamic tick support for PowerPC.

[...]


> Known issues:
> 1) with 2.6.18-hrt-dyntick2, dynamic tick mode causes bootup slowdown after the
>     HRT mode is entered (it seems to return to normal shortly);
> 2) with 2.6.18-rt7 (plus an extra patch to make it actually working :-) in the
>    kernel preemption mode other than RT, that slowdown seems permanent (this
>    was not happening with 2.6.18-rt6).

> I don't have time to investigate now, so anybody interested is welcome to...

    ... but I should have done it. :-/

> or I may even return to this if/when the time permits. :-)

    Looks like that was caused by that missing !need_resched_delayed() below. 
So, should be fixed with the latest 2.6.21-rc3-rt0 patch...

>  arch/powerpc/kernel/idle.c |    4 ++++
>  1 files changed, 4 insertions(+)
> 
> Index: linux-2.6/arch/powerpc/kernel/idle.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/kernel/idle.c
> +++ linux-2.6/arch/powerpc/kernel/idle.c
> @@ -49,6 +49,8 @@ void cpu_idle(void)
>  
>  	set_thread_flag(TIF_POLLING_NRFLAG);
>  	while (1) {
> +		hrtimer_stop_sched_tick();
> +
>  		while (!need_resched() && !cpu_should_die()) {
>  			ppc64_runlatch_off();
>  

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

end of thread, other threads:[~2007-03-16 22:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-08 20:37 [PATCH] PowerPC: dynamic tick support Sergei Shtylyov
2007-03-16 22:09 ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).