From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964838AbbDOGHC (ORCPT ); Wed, 15 Apr 2015 02:07:02 -0400 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:36313 "EHLO e23smtp03.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932836AbbDOGGy (ORCPT ); Wed, 15 Apr 2015 02:06:54 -0400 Message-ID: <552DFFC1.6050806@linux.vnet.ibm.com> Date: Wed, 15 Apr 2015 11:35:53 +0530 From: Shreyas B Prabhu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Preeti U Murthy , linux-kernel@vger.kernel.org, Michael Ellerman , "benh@kernel.crashing.org" CC: linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v4 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior References: <1428976613-13007-1-git-send-email-shreyas@linux.vnet.ibm.com> <1428976613-13007-4-git-send-email-shreyas@linux.vnet.ibm.com> <552CCF5E.5040201@linux.vnet.ibm.com> In-Reply-To: <552CCF5E.5040201@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15041506-0009-0000-0000-000001397737 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > A point that bothers me here is if we can potentially race with cpu > hotplug ? If cpuX and its siblings are offline and it was interrupted to > come online: > > cpuX cpuY > Interrupted to come online > Undo workaround > > Nop the fastsleep_workaround_exit path > IPI online cores: apply workaround once > > Set yourself in the online mask > Nop the fastsleep_workaround_entry path > > > This results in cpuX undoing the workaround on its core, never to set it > back again. > > So should we protect the region between the beginning and end of > patching instructions with get_online_cpus() and put_online_cpus() ? > Nice catch. I had missed this. Sending out a patch correcting this. Thanks, Shreyas