Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751806Ab3FYTXb (ORCPT ); Tue, 25 Jun 2013 15:23:31 -0400 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:45512 "EHLO e28smtp06.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396Ab3FYTXY (ORCPT ); Tue, 25 Jun 2013 15:23:24 -0400 Message-ID: <51C9ED61.1060306@linux.vnet.ibm.com> Date: Wed, 26 Jun 2013 00:50:01 +0530 From: "Srivatsa S. Bhat" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: Benjamin Herrenschmidt CC: Michael Ellerman , tglx@linutronix.de, peterz@infradead.org, tj@kernel.org, oleg@redhat.com, paulmck@linux.vnet.ibm.com, rusty@rustcorp.com.au, mingo@kernel.org, akpm@linux-foundation.org, namhyung@kernel.org, walken@google.com, vincent.guittot@linaro.org, laijs@cn.fujitsu.com, rostedt@goodmis.org, wangyun@linux.vnet.ibm.com, xiaoguangrong@linux.vnet.ibm.com, sbw@mit.edu, fweisbec@gmail.com, zhong@linux.vnet.ibm.com, nikunj@linux.vnet.ibm.com, linux-pm@vger.kernel.org, linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Mackerras , Ian Munsie Subject: Re: [PATCH 40/45] powerpc, irq: Use GFP_ATOMIC allocations in atomic context References: <20130623133642.19094.16038.stgit@srivatsabhat.in.ibm.com> <20130623134657.19094.93687.stgit@srivatsabhat.in.ibm.com> <20130625020842.GD14051@concordia> <1372126384.3944.177.camel@pasglop> <20130625025858.GE14051@concordia> <1372130007.3944.185.camel@pasglop> In-Reply-To: <1372130007.3944.185.camel@pasglop> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13062519-9574-0000-0000-000008759AF9 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1604 Lines: 43 On 06/25/2013 08:43 AM, Benjamin Herrenschmidt wrote: > On Tue, 2013-06-25 at 12:58 +1000, Michael Ellerman wrote: >> On Tue, Jun 25, 2013 at 12:13:04PM +1000, Benjamin Herrenschmidt wrote: >>> On Tue, 2013-06-25 at 12:08 +1000, Michael Ellerman wrote: >>>> We're not checking for allocation failure, which we should be. >>>> >>>> But this code is only used on powermac and 85xx, so it should probably >>>> just be a TODO to fix this up to handle the failure. >>> >>> And what can we do if they fail ? >> >> Fail up the chain and not unplug the CPU presumably. > > BTW. Isn't Srivatsa series removing the need to stop_machine() for > unplug ? Yes. That should mean we should be able to use GFP_KERNEL no ? No, because whatever code was being executed in stop_machine() context would still be executed with interrupts disabled. So allocations that can sleep would continue to be forbidden in this path. In the CPU unplug sequence, the CPU_DYING notifications (and the surrounding code) is guaranteed to be run: a. _on_ the CPU going offline b. with interrupts disabled on that CPU. My patchset will retain these guarantees even after removing stop_machine(). And these are required for the correct execution of the code in this path, since they rely on these semantics. So I guess I'll retain the patch as it is. Thank you! Regards, Srivatsa S. Bhat -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/