Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8256898ybn; Tue, 1 Oct 2019 05:42:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyh9K2jTIbTfeSRLpyroGmlKIoDZZZ9pCrTepg/NV+odIUb12DLKk99DZHpKssNvD5ChUQQ X-Received: by 2002:a05:6402:a50:: with SMTP id bt16mr24879903edb.114.1569933755451; Tue, 01 Oct 2019 05:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569933755; cv=none; d=google.com; s=arc-20160816; b=YhSQqS0DTNsRGN6t0BXnvjdoqn7WAx0A407ZEF3hgWaesjcpgUXKBcA+rG65Sd6bVX +dbKTyk+yQaBgjxMdoN4EYt1rlmE9uUJVdnnXrSMZ/5oA6Hpm+IP0v+YvwIsQx5yuzZQ e4wQGNd88FTZGiZ0jILa8RMvJ+X8dIkByYdHucEoXkESMSPU1AZCbN4z/OfKb70UJ/OV 8UNv++1DVmfW4eSB8RczdIl7jrFnKQoWD+y24dmzbsEmspSBOPnQ6IPRKiVNeCzu9gf8 UtdLZoFRjP4inDmJb/Oa1GHGAI6LKKdwgV8rpMQNp5BfjbFzQUPiHRbx00t22Ng67Wrm ZzCg== 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=nxY/0PuLZhxXQJtXTMeFdv4VlSseQlPtzBxC5hmaNGnLtF692hDkuL5+oSjt+pyrRN Cz+78GzZyASClXSKwPGpju64753/VumN68WBIHpZ/mLJfpRIzjVn4svMYbMRQYRT6UsH ebnyyOV5vs/By8WeOA1LocW9/1hcwhGdHdrB5ZKhREkFtbYqOeWn2k0CclGJ6u6NDqdG ll5dHDb65Lvz5Fg/rvzRdF7HWmiCow33A774cC6ASf5hoQJCQd+LjvpKPufpPmOmReaG w1HWIwVU4eMdVscQTDqpyG6GrPCeWY2JI6t3pRwyPrDyvb1d1Jyz1t5Fhk1Rf3EwHvf9 p+gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=LiRE0Joj; 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 p36si9230568edc.373.2019.10.01.05.42.10; Tue, 01 Oct 2019 05:42:35 -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=LiRE0Joj; 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 S2387950AbfJAMlE (ORCPT + 99 others); Tue, 1 Oct 2019 08:41:04 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:56686 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726181AbfJAMlE (ORCPT ); Tue, 1 Oct 2019 08:41:04 -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 x91CNwwP189082; Tue, 1 Oct 2019 12:40:09 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=LiRE0JojtzW/f4ThbLuY2RE1MQUrZiyZTkvlQt+gBNiCVr/JPaYolh2e7gPgAgB/fRho wjBhwo+0oRmTMIQh3ZqDXUfFfuwahuYVbu60Jbtzb37mjx4YNgB7aKP1dxFrxaDjj2rk uBz7S11rtrzh/ImdyldyxMK2kwdZQpJWC9+uLQPT/9j63LIt5wGewRHLcifhN+vT4Gs5 9qmfVRR7Lgv3/aOQsNLamcQa3iDItpvWOkaW56gml7/a9Cmnw0p6nVKl1t8eg0ztc3jX L/pJSP2q6gv2ermNR8N6NKPEp/0P/1Zn+Gmc9SheFee1oN5myPKlN1ygJ8QrVGpXuy6I eQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2v9xxunhy8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 01 Oct 2019 12:40:09 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x91COKG2196272; Tue, 1 Oct 2019 12:40:08 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 2vbmpygb20-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 01 Oct 2019 12:40:08 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x91Ce7vJ030504; Tue, 1 Oct 2019 12:40:07 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:40:06 -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 v3 3/4] xen: Mark "xen_nopvspin" parameter obsolete and map it to "nopvspin" Date: Mon, 30 Sep 2019 20:44:38 +0800 Message-Id: <1569847479-13201-4-git-send-email-zhenzhong.duan@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1569847479-13201-1-git-send-email-zhenzhong.duan@oracle.com> References: <1569847479-13201-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-1910010114 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-1910010114 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