From: "H. Peter Anvin" <hpa@zytor.com>
To: Peter Zijlstra <peterz@infradead.org>,
"Chen, Yu C" <yu.c.chen@intel.com>
Cc: "x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
Pavel Machek <pavel@ucw.cz>, "Brown, Len" <len.brown@intel.com>,
Borislav Petkov <bp@suse.de>,
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: Mon, 6 Jun 2016 14:05:06 -0700 [thread overview]
Message-ID: <743a8e5b-abe2-3bc1-bc03-71157b42c9ca@zytor.com> (raw)
In-Reply-To: <20160606164033.GD30154@twins.programming.kicks-ass.net>
On 06/06/16 09:40, Peter Zijlstra wrote:
> On Mon, Jun 06, 2016 at 03:59:06PM +0000, Chen, Yu C wrote:
>
>>>> + if (hibernation_in_resume())
>>>> + mwait_ptr = empty_zero_page;
>>>> + else
>>>> + mwait_ptr = ¤t_thread_info()->flags;
>>>
>>> Why is this conditional? Is there any case in which the zero page is not also
>>> correct?
>> I'm thinking of avoid unnecessary wakeup for normal CPU offline, for example,
>> if one driver uses the zero page and access it.
>
> Writing to the zero page would be a major fail.
>
One implementation of MWAIT is for the waiting processor to claim the
line in an exclusive state, which would be highly undesirable for the
zero page. I don't actually know if this is done by any real
implementation, however.
Either way, the problem at hand seems limited to post-hibernation, as
for regular CPU offline the page tables will be fully populated, so it
seems like it should not be an issue.
-hpa
next prev parent reply other threads:[~2016-06-06 21:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 14:19 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 [this message]
2016-06-07 8:03 ` Pavel Machek
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=743a8e5b-abe2-3bc1-bc03-71157b42c9ca@zytor.com \
--to=hpa@zytor.com \
--cc=bp@suse.de \
--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=pavel@ucw.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®