Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp6877181ybn; Mon, 30 Sep 2019 05:20:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNgTjypbZof7GWuckN6ZfvRZdj27gzoLtc9jPLljg17a4hTjWNV60zNnIsE+B2FO/fjQGO X-Received: by 2002:aa7:c343:: with SMTP id j3mr19451126edr.187.1569846032114; Mon, 30 Sep 2019 05:20:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569846032; cv=none; d=google.com; s=arc-20160816; b=d0B513jAdt8Jgq8LqO1V9zRpciQU0ntq5jTXY18bPAiEAg5o+hF/xQPjCNTnjBeM7h TcdOKHBoAxAmDWBAHK5ax7ipxyCbnM/TLAPs54xIFLzWDxl8hnVWeE6+tORIhFJLxJ47 GFhP7CKBc00XFjg3HxvGSClL81N3HOWCDSFW8kKVGYevATGIVb/3Q2FEOLXKlNteYxdd 3U+dRaseVAZKt36LTUJlxp4HNuemRI62avJMpb3CBgaaFU9pp/ETf8Yl73dVKAHex3AN 4FYlGjgnQJkV34Ecmc9dDIbFvA7VEzkDbjeRR1/AnWyqDiqaYyp06vgdGAPIQLnezdvE uUrg== 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=KRxC1ekJ9kuFzpcxYi26uxQXMmgq8w7EPRqrYtQTgJU=; b=Jvx/89B6wUWOXwHMSbI7ei8UUHS4FStH9DCuLFIPEgerZthHvqpRvOdn3s2VVZEPE+ C2fBJVeLg/bu2W4RoiAe1i+4Y4DhtGCqNBbOgxxUqhFCXds/PJEERc/cCJsL4VfoKaG9 6iLJAc1sxsG3KkxRPs9U32/AjNuf2v1TrTaIny7X99PK45sWV9JnPPmF3s++J5qS9UZV lSaUyfXZZIhkJu8iytpqEjkjB0Y7j7hs0JHYt5yixqY5M95/kyJ903QMb1LoT5OFdEuE +TWyoA/1w8/Ek0UIOdB2ugywo7ofOfSNAk4cKSl1F6OFz2XThV20/1ucjXE62+fqMaDr 5KmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=DCKrkSn8; 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 d35si6525995ede.440.2019.09.30.05.20.07; Mon, 30 Sep 2019 05:20:32 -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=DCKrkSn8; 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 S1730668AbfI3MRH (ORCPT + 99 others); Mon, 30 Sep 2019 08:17:07 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:36194 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726314AbfI3MRH (ORCPT ); Mon, 30 Sep 2019 08:17:07 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x8UC8npM186687; Mon, 30 Sep 2019 12:16:36 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=KRxC1ekJ9kuFzpcxYi26uxQXMmgq8w7EPRqrYtQTgJU=; b=DCKrkSn8/uZBIBk7I9zZdVuil1YquyNuKBqmGqugBQ3FNT4InmhJlqj/aAwWOJGKQz0q Y+jHBi4BVbyOHFG5bb2HjwS/Nn48XiaIVP4poezXn7c2iJo3pVKiHjvk0JT5lDOIYTmq /V1JgzNSxp1VH7df2+73dEX6tEEc6i/pnSftMI4qJNAJC5BURno7gPUa6X+bJLdWl9EJ kUsfEe5QoFrRzRdoe+t/m2YD+nxP2C1OBlH2bei9uUCmpHXlNaVqp17D8VT4lmkAIPtw 6yI7d9fB8wfAh5tL6ZoQ2Mp9aoE4Ji4neIqK6EaHe/HjCov9EibI0s2OpzUUjfRyNmay gQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 2v9xxuernp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Sep 2019 12:16:36 +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 x8UC8vjh152902; Mon, 30 Sep 2019 12:16:36 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 2vahngjd9p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Sep 2019 12:16:36 +0000 Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x8UCGX9v027670; Mon, 30 Sep 2019 12:16:33 GMT Received: from z2.cn.oracle.com (/10.182.71.205) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 30 Sep 2019 05:16:32 -0700 From: Zhenzhong Duan To: linux-kernel@vger.kernel.org Cc: Zhenzhong Duan , Jonathan Corbet , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" Subject: [PATCH 2/3] xen: Mark "xen_nopvspin" parameter obsolete and map it to "nopvspin" Date: Sun, 29 Sep 2019 20:21:05 +0800 Message-Id: <1569759666-26904-3-git-send-email-zhenzhong.duan@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1569759666-26904-1-git-send-email-zhenzhong.duan@oracle.com> References: <1569759666-26904-1-git-send-email-zhenzhong.duan@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9395 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-1909300130 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9395 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=1011 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-1909300130 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 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