From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E. McKenney" Subject: Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code Date: Tue, 3 Mar 2015 11:42:23 -0800 Message-ID: <20150303194223.GR15405__27336.0381288969$1425411862$gmane$org@linux.vnet.ibm.com> References: <20150303174144.GA13139@linux.vnet.ibm.com> <1425404595-17816-1-git-send-email-paulmck@linux.vnet.ibm.com> <1425404595-17816-2-git-send-email-paulmck@linux.vnet.ibm.com> <54F608C4.40405@oracle.com> Reply-To: paulmck@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YSsi7-0003Td-5D for xen-devel@lists.xenproject.org; Tue, 03 Mar 2015 19:42:31 +0000 Received: from /spool/local by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 3 Mar 2015 12:42:28 -0700 Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 2B83B1FF0027 for ; Tue, 3 Mar 2015 12:33:38 -0700 (MST) Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t23JgQ8N36044818 for ; Tue, 3 Mar 2015 12:42:26 -0700 Received: from d03av05.boulder.ibm.com (localhost [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t23JgOou006230 for ; Tue, 3 Mar 2015 12:42:26 -0700 Content-Disposition: inline In-Reply-To: <54F608C4.40405@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky Cc: tglx@linutronix.de, laijs@cn.fujitsu.com, bobby.prani@gmail.com, peterz@infradead.org, fweisbec@gmail.com, dvhart@linux.intel.com, x86@kernel.org, oleg@redhat.com, linux-kernel@vger.kernel.org, rostedt@goodmis.org, josh@joshtriplett.org, dhowells@redhat.com, edumazet@google.com, mathieu.desnoyers@efficios.com, David Vrabel , dipankar@in.ibm.com, xen-devel@lists.xenproject.org, akpm@linux-foundation.org, mingo@kernel.org List-Id: xen-devel@lists.xenproject.org On Tue, Mar 03, 2015 at 02:17:24PM -0500, Boris Ostrovsky wrote: > On 03/03/2015 12:42 PM, Paul E. McKenney wrote: > > } > >@@ -511,7 +508,8 @@ static void xen_cpu_die(unsigned int cpu) > > schedule_timeout(HZ/10); > > } > >- cpu_die_common(cpu); > >+ (void)cpu_wait_death(cpu, 5); > >+ /* FIXME: Are the below calls really safe in case of timeout? */ > > > Not for HVM guests (PV guests will only reach this point after > target cpu has been marked as down by the hypervisor). > > We need at least to have a message similar to what native_cpu_die() > prints on cpu_wait_death() failure. And I think we should not call > the two routines below (three, actually --- there is also > xen_teardown_timer() below, which is not part of the diff). > > -boris > > > > xen_smp_intr_free(cpu); > > xen_uninit_lock_cpu(cpu); So something like this, then? if (cpu_wait_death(cpu, 5)) { xen_smp_intr_free(cpu); xen_uninit_lock_cpu(cpu); xen_teardown_timer(cpu); } Easy change for me to make if so! Or do I need some other check for HVM-vs.-PV guests, and, if so, what would that check be? And also if so, is it OK to online a PV guest's CPU that timed out during its previous offline? Thanx, Paul