All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Wroblewski <tomasz.wroblewski@citrix.com>
To: xen-devel@lists.xen.org
Subject: Re: S3 resume issues
Date: Wed, 16 Jan 2013 03:18:47 +0100	[thread overview]
Message-ID: <50F60E07.2040302@citrix.com> (raw)
In-Reply-To: <CAOvdn6XukqQM_fV3or52+N1xhtmOtUfu+=XTJsM1ijAVByMtAA@mail.gmail.com>

On 02/01/13 14:08, Ben Guthro wrote:
> I'm starting a new thread on this, to attempt to not confuse this 
> issue, with the other S3 issue reported by Marek Marczykowski against 4.1
> If you prefer I continue that thread instead, please let me know, and 
> I will be happy to do so.
>
> Some background:
> I am attempting to chase down yet another S3 issue in the Xen-4.2 / 
> unstable tree, seen on some (but not all) platforms.
> The particular machine I am able to reproduce it 100% of the time is a 
> Lenovo T430 (Ivy bridge laptop)
>
I've been debugging this same issue alongside Ben, happening on Lenovo 
T520 laptop. Found out that this is fixable by putting

mdelay(500)

in arch/x86/acpi/power.c : enter_state()

pretty much doesn't matter where in this function this is placed, fixes 
the issue. Further debugging what happens during just the period of this 
mdelay() revealed that there is hardware apic timer interrupt firing 
during that period, which if not serviced before the S3 suspend, will 
cause a failure after resume.

So this interrupt is serviced in apic.c apic_timer_interrupt(). It 
mainly just asserts TIMER_SOFTIRQ. Indeed, replacing the mdelay() with 
raise_softirq(TIMER_SOFTIRQ) anywhere in enter_state() fixes the problem 
as well.

So my theory is that the local apic timer state is lost during the S3 
suspend, causing a failure to fire off the timer interrupt and 
subsequent failure to assert the TIMER_SOFTIRQ. Given that some timers 
in sched_credit.c and schedule.c seem to be hanging on this timer 
softirq in order to keep the scheduler going, I suspect the scheduler 
stops working properly after the resume.

Does that sound plausible? Asserting the TIMER_SOFTIRQ on resume path 
seems to be one way of fixing this, is there any better way? Like for 
example some tweaks to lapic_suspend() / lapic_resume() to do extra 
preservation of the lapic timer/interrupt state ?

      parent reply	other threads:[~2013-01-16  2:18 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-02 13:08 S3 resume issues Ben Guthro
2013-01-02 15:15 ` Malcolm Crossley
2013-01-02 15:31   ` Ben Guthro
2013-01-02 16:46     ` Ben Guthro
2013-01-02 20:35       ` Malcolm Crossley
2013-01-02 20:50         ` Ben Guthro
2013-01-03 10:19       ` Jan Beulich
2013-01-03 16:33         ` Ben Guthro
2013-01-03 17:08           ` Jan Beulich
2013-01-03 17:28             ` Ben Guthro
2013-01-03 21:26               ` Ben Guthro
2013-01-04  8:34                 ` Jan Beulich
2013-01-11 20:32                   ` Ben Guthro
2013-01-14 22:00                     ` Ben Guthro
2013-01-15  8:33                       ` Jan Beulich
2013-01-15 12:55                         ` Ben Guthro
2013-01-15 18:10                           ` Ben Guthro
2013-01-15 18:17                             ` Malcolm Crossley
2013-01-15 18:22                               ` Ben Guthro
2013-01-15 18:32                                 ` Malcolm Crossley
2013-01-15 18:38                                   ` Ben Guthro
2013-01-15 18:39                                     ` Malcolm Crossley
2013-01-16 16:16                                       ` Ben Guthro
2013-01-16  9:35                             ` Jan Beulich
     [not found]                               ` <CAOvdn6V6N1V9ZYbARTJPEgSvxPe83pSiO6TmxBLy1LJEkods6A@mail.gmail.com>
2013-01-16 10:57                                 ` Jan Beulich
2013-01-16 11:05                                   ` Ben Guthro
2013-01-16 11:09                                     ` Jan Beulich
2013-01-16 11:17                                       ` Ben Guthro
2013-01-02 17:14     ` Pasi Kärkkäinen
2013-01-02 17:20       ` Ben Guthro
2013-01-16  2:18 ` Tomasz Wroblewski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50F60E07.2040302@citrix.com \
    --to=tomasz.wroblewski@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.