From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756271AbbE2OpK (ORCPT ); Fri, 29 May 2015 10:45:10 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:41333 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751854AbbE2OpD (ORCPT ); Fri, 29 May 2015 10:45:03 -0400 Message-ID: <55687B51.6000907@oracle.com> Date: Fri, 29 May 2015 10:44:33 -0400 From: Boris Ostrovsky User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Nicholas Mc Guire , Konrad Rzeszutek Wilk CC: David Vrabel , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/xen: use schedule_timeout_interruptible() References: <1432907387-31523-1-git-send-email-hofrat@osadl.org> In-Reply-To: <1432907387-31523-1-git-send-email-hofrat@osadl.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/29/2015 09:49 AM, Nicholas Mc Guire wrote: > API consolidation with coccinelle found: > ./arch/x86/xen/smp.c:499:2-18: > consolidation with schedule_timeout_*() recommended > > This is a 1:1 conversion of the current calls to an available helper > only - so only an API consolidation to improve readability. > > Patch was compile tested with x86_64_defconfig + > CONFIG_HYPERVISOR_GUEST=y,CONFIG_PARAVIRT=y,CONFIG_XEN=y: > > Patch is against 4.1-rc5 (localversion-next is -next-20150529) > > Signed-off-by: Nicholas Mc Guire Reviewed-by: Boris Ostrovsky < boris.ostrovsky@oracle.com> > --- > arch/x86/xen/smp.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c > index 8648438..6cbbfc8 100644 > --- a/arch/x86/xen/smp.c > +++ b/arch/x86/xen/smp.c > @@ -494,10 +494,8 @@ static int xen_cpu_disable(void) > > static void xen_cpu_die(unsigned int cpu) > { > - while (xen_pv_domain() && HYPERVISOR_vcpu_op(VCPUOP_is_up, cpu, NULL)) { > - __set_current_state(TASK_UNINTERRUPTIBLE); > - schedule_timeout(HZ/10); > - } > + while (xen_pv_domain() && HYPERVISOR_vcpu_op(VCPUOP_is_up, cpu, NULL)) > + schedule_timeout_uninterruptible(msecs_to_jiffies(100)); > > if (common_cpu_die(cpu) == 0) { > xen_smp_intr_free(cpu);