Re: [PATCH] hres_timers_resume must block interrupts

2007-08-14 Thread Thomas Gleixner
On Tue, 2007-08-14 at 07:36 +0200, Thomas Gleixner wrote:
> On Mon, 2007-08-13 at 19:26 -0400, Joe Korty wrote:
> > Retrigger_next_event() must be called with interrupts disabled.
> > 
> > All internal (to hrtimer.c) uses of retrigger_next_event() are correct.
> > But the version exported to other files, hres_timers_resume(), does not
> > do the IRQ blocking, nor does the (single) external caller of it.
> > 
> > Rather than require that users of hres_timers_resume() do the IRQ blocking,
> > this patch makes the blocking part of the hres_timers_resume() 
> > functionality.
> 
> Ack.

-ENOTENOUGHCOFFEE. 

The resume functions are called with interrupts disabled. Nothing to fix
here.

tglx


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] hres_timers_resume must block interrupts

2007-08-14 Thread Thomas Gleixner
On Tue, 2007-08-14 at 07:36 +0200, Thomas Gleixner wrote:
 On Mon, 2007-08-13 at 19:26 -0400, Joe Korty wrote:
  Retrigger_next_event() must be called with interrupts disabled.
  
  All internal (to hrtimer.c) uses of retrigger_next_event() are correct.
  But the version exported to other files, hres_timers_resume(), does not
  do the IRQ blocking, nor does the (single) external caller of it.
  
  Rather than require that users of hres_timers_resume() do the IRQ blocking,
  this patch makes the blocking part of the hres_timers_resume() 
  functionality.
 
 Ack.

-ENOTENOUGHCOFFEE. 

The resume functions are called with interrupts disabled. Nothing to fix
here.

tglx


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] hres_timers_resume must block interrupts

2007-08-13 Thread Thomas Gleixner
On Mon, 2007-08-13 at 19:26 -0400, Joe Korty wrote:
> Retrigger_next_event() must be called with interrupts disabled.
> 
> All internal (to hrtimer.c) uses of retrigger_next_event() are correct.
> But the version exported to other files, hres_timers_resume(), does not
> do the IRQ blocking, nor does the (single) external caller of it.
> 
> Rather than require that users of hres_timers_resume() do the IRQ blocking,
> this patch makes the blocking part of the hres_timers_resume() functionality.

Ack.

> (Also remove the meaningless WARN_ON_ONCE() call in hres_timers_resume)

It's not that meaningless. It catched a resume order problem some time
ago.

tglx

> Signed-off-by: Joe Korty ([EMAIL PROTECTED])
> 
> Index: 2.6.23-rc3/kernel/hrtimer.c
> ===
> --- 2.6.23-rc3.orig/kernel/hrtimer.c  2007-08-13 18:30:09.0 -0400
> +++ 2.6.23-rc3/kernel/hrtimer.c   2007-08-13 18:38:48.0 -0400
> @@ -463,10 +463,11 @@
>   */
>  void hres_timers_resume(void)
>  {
> - WARN_ON_ONCE(num_online_cpus() > 1);
> + unsigned long flags;
>  
> - /* Retrigger the CPU local events: */
> + local_irq_save(flags);
>   retrigger_next_event(NULL);
> + local_irq_restore(flags);
>  }
>  
>  /*
> 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] hres_timers_resume must block interrupts

2007-08-13 Thread Joe Korty
Retrigger_next_event() must be called with interrupts disabled.

All internal (to hrtimer.c) uses of retrigger_next_event() are correct.
But the version exported to other files, hres_timers_resume(), does not
do the IRQ blocking, nor does the (single) external caller of it.

Rather than require that users of hres_timers_resume() do the IRQ blocking,
this patch makes the blocking part of the hres_timers_resume() functionality.

(Also remove the meaningless WARN_ON_ONCE() call in hres_timers_resume)

Signed-off-by: Joe Korty ([EMAIL PROTECTED])

Index: 2.6.23-rc3/kernel/hrtimer.c
===
--- 2.6.23-rc3.orig/kernel/hrtimer.c2007-08-13 18:30:09.0 -0400
+++ 2.6.23-rc3/kernel/hrtimer.c 2007-08-13 18:38:48.0 -0400
@@ -463,10 +463,11 @@
  */
 void hres_timers_resume(void)
 {
-   WARN_ON_ONCE(num_online_cpus() > 1);
+   unsigned long flags;
 
-   /* Retrigger the CPU local events: */
+   local_irq_save(flags);
retrigger_next_event(NULL);
+   local_irq_restore(flags);
 }
 
 /*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] hres_timers_resume must block interrupts

2007-08-13 Thread Joe Korty
Retrigger_next_event() must be called with interrupts disabled.

All internal (to hrtimer.c) uses of retrigger_next_event() are correct.
But the version exported to other files, hres_timers_resume(), does not
do the IRQ blocking, nor does the (single) external caller of it.

Rather than require that users of hres_timers_resume() do the IRQ blocking,
this patch makes the blocking part of the hres_timers_resume() functionality.

(Also remove the meaningless WARN_ON_ONCE() call in hres_timers_resume)

Signed-off-by: Joe Korty ([EMAIL PROTECTED])

Index: 2.6.23-rc3/kernel/hrtimer.c
===
--- 2.6.23-rc3.orig/kernel/hrtimer.c2007-08-13 18:30:09.0 -0400
+++ 2.6.23-rc3/kernel/hrtimer.c 2007-08-13 18:38:48.0 -0400
@@ -463,10 +463,11 @@
  */
 void hres_timers_resume(void)
 {
-   WARN_ON_ONCE(num_online_cpus()  1);
+   unsigned long flags;
 
-   /* Retrigger the CPU local events: */
+   local_irq_save(flags);
retrigger_next_event(NULL);
+   local_irq_restore(flags);
 }
 
 /*

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] hres_timers_resume must block interrupts

2007-08-13 Thread Thomas Gleixner
On Mon, 2007-08-13 at 19:26 -0400, Joe Korty wrote:
 Retrigger_next_event() must be called with interrupts disabled.
 
 All internal (to hrtimer.c) uses of retrigger_next_event() are correct.
 But the version exported to other files, hres_timers_resume(), does not
 do the IRQ blocking, nor does the (single) external caller of it.
 
 Rather than require that users of hres_timers_resume() do the IRQ blocking,
 this patch makes the blocking part of the hres_timers_resume() functionality.

Ack.

 (Also remove the meaningless WARN_ON_ONCE() call in hres_timers_resume)

It's not that meaningless. It catched a resume order problem some time
ago.

tglx

 Signed-off-by: Joe Korty ([EMAIL PROTECTED])
 
 Index: 2.6.23-rc3/kernel/hrtimer.c
 ===
 --- 2.6.23-rc3.orig/kernel/hrtimer.c  2007-08-13 18:30:09.0 -0400
 +++ 2.6.23-rc3/kernel/hrtimer.c   2007-08-13 18:38:48.0 -0400
 @@ -463,10 +463,11 @@
   */
  void hres_timers_resume(void)
  {
 - WARN_ON_ONCE(num_online_cpus()  1);
 + unsigned long flags;
  
 - /* Retrigger the CPU local events: */
 + local_irq_save(flags);
   retrigger_next_event(NULL);
 + local_irq_restore(flags);
  }
  
  /*
 

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/