From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH][RFC] x86, hotplug: Use zero page for monitor when resuming from hibernation Date: Mon, 6 Jun 2016 18:40:33 +0200 Message-ID: <20160606164033.GD30154@twins.programming.kicks-ass.net> References: <1465222749-8388-1-git-send-email-yu.c.chen@intel.com> <20160606142506.GE30909@twins.programming.kicks-ass.net> <36DF59CE26D8EE47B0655C516E9CE6402876CB97@shsmsx102.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from merlin.infradead.org ([205.233.59.134]:54836 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbcFFQky (ORCPT ); Mon, 6 Jun 2016 12:40:54 -0400 Content-Disposition: inline In-Reply-To: <36DF59CE26D8EE47B0655C516E9CE6402876CB97@shsmsx102.ccr.corp.intel.com> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: "Chen, Yu C" Cc: "x86@kernel.org" , "linux-kernel@vger.kernel.org" , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , "linux-pm@vger.kernel.org" , "Rafael J . Wysocki" , Pavel Machek , "Brown, Len" , Borislav Petkov , Zhu Guihua , Juergen Gross 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.