All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: v3.4-rc1 s2ram regression
@ 2012-04-01 13:26 Konstantin Khlebnikov
  2012-04-01 16:53 ` Marcelo Tosatti
  0 siblings, 1 reply; 4+ messages in thread
From: Konstantin Khlebnikov @ 2012-04-01 13:26 UTC (permalink / raw)
  To: x86, linux-kernel, linux-pm
  Cc: Marcelo Tosatti, Rafael J. Wysocki, Ingo Molnar, Avi Kivity,
	Pavel Machek, H. Peter Anvin, Igor Mammedov, Thomas Gleixner

commit b74f05d61b73af584d0c39121980171389ecfaaa
("x86: kvmclock: abstract save/restore sched_clock_state")
breaks s2ram for my notebook. It hangs (maybe panic) somewhere on resume stage
and blinks with all possible leds =) Screen is black, so I don't know what happened.

reverting or following patch helps

Bisected-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
---
 arch/x86/power/cpu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
index 4793683..2bc5a82 100644
--- a/arch/x86/power/cpu.c
+++ b/arch/x86/power/cpu.c
@@ -231,8 +231,8 @@ static void __restore_processor_state(struct saved_context *ctxt)
 /* Needed by apm.c */
 void restore_processor_state(void)
 {
-	x86_platform.restore_sched_clock_state();
 	__restore_processor_state(&saved_context);
+	x86_platform.restore_sched_clock_state();
 }
 #ifdef CONFIG_X86_32
 EXPORT_SYMBOL(restore_processor_state);


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

* Re: [PATCH] x86: v3.4-rc1 s2ram regression
  2012-04-01 13:26 [PATCH] x86: v3.4-rc1 s2ram regression Konstantin Khlebnikov
@ 2012-04-01 16:53 ` Marcelo Tosatti
  2012-04-02  7:27   ` Ingo Molnar
  2012-04-02  8:27   ` Konstantin Khlebnikov
  0 siblings, 2 replies; 4+ messages in thread
From: Marcelo Tosatti @ 2012-04-01 16:53 UTC (permalink / raw)
  To: Konstantin Khlebnikov
  Cc: x86, linux-kernel, linux-pm, Rafael J. Wysocki, Ingo Molnar,
	Avi Kivity, Pavel Machek, H. Peter Anvin, Igor Mammedov,
	Thomas Gleixner

On Sun, Apr 01, 2012 at 05:26:43PM +0400, Konstantin Khlebnikov wrote:
> commit b74f05d61b73af584d0c39121980171389ecfaaa
> ("x86: kvmclock: abstract save/restore sched_clock_state")
> breaks s2ram for my notebook. It hangs (maybe panic) somewhere on resume stage
> and blinks with all possible leds =) Screen is black, so I don't know what happened.
> 
> reverting or following patch helps
> 
> Bisected-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Marcelo Tosatti <mtosatti@redhat.com>
> Cc: Avi Kivity <avi@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> ---
>  arch/x86/power/cpu.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
> index 4793683..2bc5a82 100644
> --- a/arch/x86/power/cpu.c
> +++ b/arch/x86/power/cpu.c
> @@ -231,8 +231,8 @@ static void __restore_processor_state(struct saved_context *ctxt)
>  /* Needed by apm.c */
>  void restore_processor_state(void)
>  {
> -	x86_platform.restore_sched_clock_state();
>  	__restore_processor_state(&saved_context);
> +	x86_platform.restore_sched_clock_state();
>  }
>  #ifdef CONFIG_X86_32
>  EXPORT_SYMBOL(restore_processor_state);

The correct fix is in kvm.git (see below).

Ingo, can you please merge it through x86 tree while the
kvm.git issues are resolved? It has been forward to you directly.

    x86: call restore_sched_clock_state after %gs is initialized
    
    restore_sched_clock_state methods use percpu data, therefore they
    must run after %gs is initialized, but before mtrr_bp_restore (due to
    lockstat using sched_clock).
    
    Move it to the correct place.
    
    Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
    Signed-off-by: Avi Kivity <avi@redhat.com>



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

* Re: [PATCH] x86: v3.4-rc1 s2ram regression
  2012-04-01 16:53 ` Marcelo Tosatti
@ 2012-04-02  7:27   ` Ingo Molnar
  2012-04-02  8:27   ` Konstantin Khlebnikov
  1 sibling, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2012-04-02  7:27 UTC (permalink / raw)
  To: Marcelo Tosatti
  Cc: Konstantin Khlebnikov, x86, linux-kernel, linux-pm,
	Rafael J. Wysocki, Ingo Molnar, Avi Kivity, Pavel Machek,
	H. Peter Anvin, Igor Mammedov, Thomas Gleixner


* Marcelo Tosatti <mtosatti@redhat.com> wrote:

> On Sun, Apr 01, 2012 at 05:26:43PM +0400, Konstantin Khlebnikov wrote:
> > commit b74f05d61b73af584d0c39121980171389ecfaaa
> > ("x86: kvmclock: abstract save/restore sched_clock_state")
> > breaks s2ram for my notebook. It hangs (maybe panic) somewhere on resume stage
> > and blinks with all possible leds =) Screen is black, so I don't know what happened.
> > 
> > reverting or following patch helps
> > 
> > Bisected-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Marcelo Tosatti <mtosatti@redhat.com>
> > Cc: Avi Kivity <avi@redhat.com>
> > Cc: Igor Mammedov <imammedo@redhat.com>
> > ---
> >  arch/x86/power/cpu.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
> > index 4793683..2bc5a82 100644
> > --- a/arch/x86/power/cpu.c
> > +++ b/arch/x86/power/cpu.c
> > @@ -231,8 +231,8 @@ static void __restore_processor_state(struct saved_context *ctxt)
> >  /* Needed by apm.c */
> >  void restore_processor_state(void)
> >  {
> > -	x86_platform.restore_sched_clock_state();
> >  	__restore_processor_state(&saved_context);
> > +	x86_platform.restore_sched_clock_state();
> >  }
> >  #ifdef CONFIG_X86_32
> >  EXPORT_SYMBOL(restore_processor_state);
> 
> The correct fix is in kvm.git (see below).
> 
> Ingo, can you please merge it through x86 tree while the
> kvm.git issues are resolved? It has been forward to you directly.
> 
>     x86: call restore_sched_clock_state after %gs is initialized
>     
>     restore_sched_clock_state methods use percpu data, therefore they
>     must run after %gs is initialized, but before mtrr_bp_restore (due to
>     lockstat using sched_clock).
>     
>     Move it to the correct place.
>     
>     Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
>     Signed-off-by: Avi Kivity <avi@redhat.com>

Ok, will queue it up.

Thanks,

	Ingo

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

* Re: [PATCH] x86: v3.4-rc1 s2ram regression
  2012-04-01 16:53 ` Marcelo Tosatti
  2012-04-02  7:27   ` Ingo Molnar
@ 2012-04-02  8:27   ` Konstantin Khlebnikov
  1 sibling, 0 replies; 4+ messages in thread
From: Konstantin Khlebnikov @ 2012-04-02  8:27 UTC (permalink / raw)
  To: Marcelo Tosatti
  Cc: x86, linux-kernel, linux-pm, Rafael J. Wysocki, Ingo Molnar,
	Avi Kivity, Pavel Machek, H. Peter Anvin, Igor Mammedov,
	Thomas Gleixner

Marcelo Tosatti wrote:
> On Sun, Apr 01, 2012 at 05:26:43PM +0400, Konstantin Khlebnikov wrote:
>> commit b74f05d61b73af584d0c39121980171389ecfaaa
>> ("x86: kvmclock: abstract save/restore sched_clock_state")
>> breaks s2ram for my notebook. It hangs (maybe panic) somewhere on resume stage
>> and blinks with all possible leds =) Screen is black, so I don't know what happened.
>>
>> reverting or following patch helps
>>
>> Bisected-by: Konstantin Khlebnikov<khlebnikov@openvz.org>
>> Cc: Thomas Gleixner<tglx@linutronix.de>
>> Cc: Marcelo Tosatti<mtosatti@redhat.com>
>> Cc: Avi Kivity<avi@redhat.com>
>> Cc: Igor Mammedov<imammedo@redhat.com>
>> ---
>>   arch/x86/power/cpu.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
>> index 4793683..2bc5a82 100644
>> --- a/arch/x86/power/cpu.c
>> +++ b/arch/x86/power/cpu.c
>> @@ -231,8 +231,8 @@ static void __restore_processor_state(struct saved_context *ctxt)
>>   /* Needed by apm.c */
>>   void restore_processor_state(void)
>>   {
>> -	x86_platform.restore_sched_clock_state();
>>   	__restore_processor_state(&saved_context);
>> +	x86_platform.restore_sched_clock_state();
>>   }
>>   #ifdef CONFIG_X86_32
>>   EXPORT_SYMBOL(restore_processor_state);
>
> The correct fix is in kvm.git (see below).

Thanks. Your patch works for me too.

>
> Ingo, can you please merge it through x86 tree while the
> kvm.git issues are resolved? It has been forward to you directly.
>
>      x86: call restore_sched_clock_state after %gs is initialized
>
>      restore_sched_clock_state methods use percpu data, therefore they
>      must run after %gs is initialized, but before mtrr_bp_restore (due to
>      lockstat using sched_clock).
>
>      Move it to the correct place.
>
>      Signed-off-by: Marcelo Tosatti<mtosatti@redhat.com>
>      Signed-off-by: Avi Kivity<avi@redhat.com>
>
>


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

end of thread, other threads:[~2012-04-02  8:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-01 13:26 [PATCH] x86: v3.4-rc1 s2ram regression Konstantin Khlebnikov
2012-04-01 16:53 ` Marcelo Tosatti
2012-04-02  7:27   ` Ingo Molnar
2012-04-02  8:27   ` Konstantin Khlebnikov

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.