Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8215723ybn; Tue, 1 Oct 2019 05:06:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwg4E3fH4Vn0WTrJmkr9it6+oATu1S9UxoEvlqzxB6qmfFTXNHsTnswpuEqGn/Fgjc55Ka1 X-Received: by 2002:a17:906:4d08:: with SMTP id r8mr23758770eju.283.1569931613983; Tue, 01 Oct 2019 05:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569931613; cv=none; d=google.com; s=arc-20160816; b=NhPbQoEWUQF0hZKG1BhNLcVrGOagbiJiKC3u83EB4+wiFNbh7vvINFPO5AR4W1Zehm G3aIWNgohFswB/eWhxaVQcLV21c1u69q/fAh4i3mlUApTHM1Q5ds6jK9bN0cgvs4dyrp bRi1doKJhJNqZgDS5WBylKnXXCYGZRClUsk4m+eivoVMN/KSbIgiYjat1PYgBECsOEXm GgQ/pd+OB2km+VPbvKhUxk65xl1ss4McwrRc3/2oxoMn8jb1PeyArIj86FI3BgFVhrFj RLVDtqTif2EmEalZqSGGl6pm0lzuJtuse7Ozxsi5RmMzy9QPX/JNHbyDgugZOgZVQQD8 ZxMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=GtVRWSkJdvDM4w/69JBG+TdrM2Ajm19z9dVkdS+dmOs=; b=ns07jXk01q4ul/l04EEvZpGPhWns1/ysTI1FxCd6lIVsmi/OvDCgeD+JvhiPm0BY9e 4/Gl1Fuc43XTmgUnpwNc6r9M7CAab7naDjXWIOSGVxJFEzNDfkXF89td3W+60GQWngl5 eZw06n1LnEUqLlPEAIZ8d0GavUqa59CbFp9HeNDzM9PcHh7Jg+yRTPlPmDTR1FUAgQnS 0XPAje2fMasN4YOhBmx6d17f/IkRqHJhNqWY7TH3a1rR0W7ECSqPxxESAVGk3Pib+KxG PyS3bdxMT77GJfTYgdDmbG6SkpsZj0GHVDWQLzkpmcRGR6f9u29k17pLCm3/oz1FwOdv WbCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=LHAtxdsQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rl13si8889885ejb.228.2019.10.01.05.06.29; Tue, 01 Oct 2019 05:06:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=LHAtxdsQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387610AbfJAMFP (ORCPT + 99 others); Tue, 1 Oct 2019 08:05:15 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:42092 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726457AbfJAMFO (ORCPT ); Tue, 1 Oct 2019 08:05:14 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x91C4E1V129166; Tue, 1 Oct 2019 12:04:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2019-08-05; bh=GtVRWSkJdvDM4w/69JBG+TdrM2Ajm19z9dVkdS+dmOs=; b=LHAtxdsQefy6H8zHSY47IDJalrn4d1e35RMSy3o1RDccr/MFGPQX1IkYoY1XHH5mBwNh mR4+XW5uWh4Bu3pojuYYKe5okJ8M+DjT63kv4uNM5+Cj6HLnFyH9EzqWfBRTEB7kgCgV 21zUY6t4Acq+hPacnkmqwLm6vxeacUP8vx7lNWKz3GF8QIMU5rJLGJQRFd0a1uYDd30p FRk7KfVaeBPne60CRkFvDk0cXv11JwjBMJiHRtAahkkuQhCBtULQNzUOHbwlhb7XqI1t Yn7dZ8Lxt8ZKqSxRK/ZqC5Hm6odB5sSkWE53pgTmwikwFAEuGfdX8VImF3AwxE0vAhoR mw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2v9yfq5a3b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 01 Oct 2019 12:04:27 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x91C3Nu4157473; Tue, 1 Oct 2019 12:04:26 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 2vbnqcs9jd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 01 Oct 2019 12:04:26 +0000 Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x91C4O3s022170; Tue, 1 Oct 2019 12:04:24 GMT Received: from z2.cn.oracle.com (/10.182.71.205) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 01 Oct 2019 05:04:23 -0700 From: Zhenzhong Duan To: linux-kernel@vger.kernel.org Cc: vkuznets@redhat.com, linux-hyperv@vger.kernel.org, kvm@vger.kernel.org, Zhenzhong Duan , Jonathan Corbet , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" Subject: [PATCH v2 3/4] xen: Mark "xen_nopvspin" parameter obsolete and map it to "nopvspin" Date: Mon, 30 Sep 2019 20:08:59 +0800 Message-Id: <1569845340-11884-4-git-send-email-zhenzhong.duan@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1569845340-11884-1-git-send-email-zhenzhong.duan@oracle.com> References: <1569845340-11884-1-git-send-email-zhenzhong.duan@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9396 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910010112 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9396 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910010112 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix stale description of "xen_nopvspin" as we use qspinlock now. Signed-off-by: Zhenzhong Duan Reviewed-by: Juergen Gross Cc: Jonathan Corbet Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" --- Documentation/admin-guide/kernel-parameters.txt | 7 ++++--- arch/x86/xen/spinlock.c | 13 +++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 4b956d8..1f0a62f 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -5303,8 +5303,9 @@ never -- do not unplug even if version check succeeds xen_nopvspin [X86,XEN] - Disables the ticketlock slowpath using Xen PV - optimizations. + Disables the qspinlock slowpath using Xen PV optimizations. + This parameter is obsoleted by "nopvspin" parameter, which + has equivalent effect for XEN platform. xen_nopv [X86] Disables the PV optimizations forcing the HVM guest to @@ -5330,7 +5331,7 @@ as generic guest with no PV drivers. Currently support XEN HVM, KVM, HYPER_V and VMWARE guest. - nopvspin [X86,KVM] Disables the qspinlock slow path + nopvspin [X86,XEN,KVM] Disables the qspinlock slow path using PV optimizations which allow the hypervisor to 'idle' the guest on lock contention. diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 6deb490..092a53f 100644 --- a/arch/x86/xen/spinlock.c +++ b/arch/x86/xen/spinlock.c @@ -18,7 +18,6 @@ static DEFINE_PER_CPU(int, lock_kicker_irq) = -1; static DEFINE_PER_CPU(char *, irq_name); static DEFINE_PER_CPU(atomic_t, xen_qlock_wait_nest); -static bool xen_pvspin = true; static void xen_qlock_kick(int cpu) { @@ -68,7 +67,7 @@ void xen_init_lock_cpu(int cpu) int irq; char *name; - if (!xen_pvspin) + if (!pvspin) return; WARN(per_cpu(lock_kicker_irq, cpu) >= 0, "spinlock on CPU%d exists on IRQ%d!\n", @@ -93,7 +92,7 @@ void xen_init_lock_cpu(int cpu) void xen_uninit_lock_cpu(int cpu) { - if (!xen_pvspin) + if (!pvspin) return; unbind_from_irqhandler(per_cpu(lock_kicker_irq, cpu), NULL); @@ -117,9 +116,9 @@ void __init xen_init_spinlocks(void) /* Don't need to use pvqspinlock code if there is only 1 vCPU. */ if (num_possible_cpus() == 1) - xen_pvspin = false; + pvspin = false; - if (!xen_pvspin) { + if (!pvspin) { printk(KERN_DEBUG "xen: PV spinlocks disabled\n"); static_branch_disable(&virt_spin_lock_key); return; @@ -137,7 +136,9 @@ void __init xen_init_spinlocks(void) static __init int xen_parse_nopvspin(char *arg) { - xen_pvspin = false; + pr_notice("\"xen_nopvspin\" is deprecated, please use \"nopvspin\" instead\n"); + if (xen_domain()) + pvspin = false; return 0; } early_param("xen_nopvspin", xen_parse_nopvspin); -- 1.8.3.1