From: Pavel Machek <pavel@ucw.cz>
To: Chen Yu <yu.c.chen@intel.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
linux-pm@vger.kernel.org,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
Len Brown <len.brown@intel.com>, Borislav Petkov <bp@suse.de>,
Peter Zijlstra <peterz@infradead.org>,
Zhu Guihua <zhugh.fnst@cn.fujitsu.com>,
Juergen Gross <jgross@suse.com>
Subject: Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when resuming from hibernation
Date: Tue, 7 Jun 2016 10:03:07 +0200 [thread overview]
Message-ID: <20160607080307.GB13858@amd> (raw)
In-Reply-To: <1465222749-8388-1-git-send-email-yu.c.chen@intel.com>
On Mon 2016-06-06 22:19:09, Chen Yu wrote:
> Stress test from Varun Koyyalagunta reports that, the
> nonboot CPU would hang occasionally, when resuming from
> hibernation. Further investigation shows that, the precise
> phase when nonboot CPU hangs, is the time when the nonboot
> CPU been woken up incorrectly, and tries to monitor the
> mwait_ptr for the second time, then an exception is
> triggered due to illegal vaddr access, say, something like,
> 'Unable to handler kernel address of 0xffff8800ba800010...'
>
> One of the possible scenarios for this issue is illustrated below,
> when the boot CPU tries to resume from hibernation:
> 1. puts the nonboot CPUs offline, so the nonboot CPUs are monitoring
> at the address of the task_struct.flags.
> 2. boot CPU copies pages to their original address, which includes
> task_struct.flags, thus wakes up one of the nonboot CPUs.
> 3. nonboot CPU tries to monitor the task_struct.flags again, but since
> the page table for task_struct.flags has been overwritten by
> boot CPU, and there is probably a changed across hibernation
> (because of inconsistence of e820 memory map), an exception is
> triggered.
If memory map changes between suspend and resume, there'll be fun. If
that's suspected, should we attach md5 sum of e820 to the hibernation
image?
I doubt mwait fix is enough to catch everything in that case...
Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2016-06-07 8:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 14:19 [PATCH][RFC] x86, hotplug: Use zero page for monitor when resuming from hibernation Chen Yu
2016-06-06 14:25 ` Peter Zijlstra
2016-06-06 15:59 ` Chen, Yu C
2016-06-06 16:40 ` Peter Zijlstra
2016-06-06 17:34 ` Brian Gerst
2016-06-06 21:05 ` H. Peter Anvin
2016-06-07 8:03 ` Pavel Machek [this message]
2016-06-07 8:44 ` Chen Yu
2016-06-07 9:13 ` Borislav Petkov
2016-06-07 9:43 ` Chen Yu
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=20160607080307.GB13858@amd \
--to=pavel@ucw.cz \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yu.c.chen@intel.com \
--cc=zhugh.fnst@cn.fujitsu.com \
/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.