Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1241813

Re: [RFC PATCH v1 2/2] xen_nopv: Combine a bunch of the PV features that can be disabled

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Boris Ostrovsky <boris.ostrovsky@oracle.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH v1 2/2] xen_nopv: Combine a bunch of the PV features that can be disabled
Date Wed, 07 Oct 2015 23:40:02 +0200
Message-ID <qh4Bk-eo-13@gated-at.bofh.it> (permalink)
References <qh3vA-78b-19@gated-at.bofh.it> <qh3vA-78b-25@gated-at.bofh.it>
X-Original-To Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>, joao.m.martins@oracle.com, david.vrabel@citrix.com, jgross@suse.com, dario.faggioli@citrix.com, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0
MIME-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Source-IP aserv0021.oracle.com [141.146.126.233]
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 91
Organization linux.* mail to news gateway
X-Original-Date Wed, 7 Oct 2015 17:29:45 -0400
X-Original-Message-ID <56158EC9.6010104@oracle.com>
X-Original-References <1444249310-23433-1-git-send-email-konrad.wilk@oracle.com> <1444249310-23433-3-git-send-email-konrad.wilk@oracle.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1241813

Show key headers only | View raw


On 10/07/2015 04:21 PM, Konrad Rzeszutek Wilk wrote:
> under one parameter. Removes the xen_nopvspin parameter and
> makes it part of the xen_nopv.
>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
>   Documentation/kernel-parameters.txt | 15 +++++------
>   arch/x86/xen/enlighten.c            | 50 +++++++++++++++++++++++++++++++++----
>   arch/x86/xen/spinlock.c             | 18 ++++---------
>   arch/x86/xen/xen-ops.h              |  4 +++
>   4 files changed, 62 insertions(+), 25 deletions(-)
>
> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> index 22a4b68..73cd745 100644
> --- a/Documentation/kernel-parameters.txt
> +++ b/Documentation/kernel-parameters.txt
> @@ -4125,13 +4125,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
>   				the unplug protocol
>   			never -- do not unplug even if version check succeeds
>   
> -	xen_nopvspin	[X86,XEN]
> -			Disables the ticketlock slowpath using Xen PV
> -			optimizations.
> -
> -	xen_nopv	[X86]
> -			Disables the PV optimizations forcing the HVM guest to
> -			run as generic HVM guest with no PV drivers.
> +	xen_nopv=	[X86,XEN]
> +			Disables various (or all) PV optimizations forcing the
> +			HVM (or PV) guest to run without them.
> +			Format: [off0,][off]

{ [spin][,ipi] | all }


> +			all -- every PV feature on HVM.
> +			spin -- Disables the ticketlock slowpath using Xen PV
> +                                optimizations (PV and HVM).
> +			ipi - Disable PV event channel IPI (on HVM).
>   
>   	xirc2ps_cs=	[NET,PCMCIA]
>   			Format:
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index 30d12af..c644d2c 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -1829,17 +1829,57 @@ static void __init xen_hvm_guest_init(void)
>   }
>   #endif
>   
> -static bool xen_nopv = false;
> +static unsigned int xen_nopv_feat;
> +#define XEN_NOPV_SPIN	1<<1
> +#define XEN_NOPV_IPI	1<<2
> +#define XEN_NOPV_ALL	(XEN_NOPV_SPIN | XEN_NOPV_IPI)
> +
> +bool xen_no_pvspin(void)
> +{
> +	return xen_nopv_feat & XEN_NOPV_SPIN;
> +}
> +
> +bool xen_no_pv(void)
> +{
> +	return xen_nopv_feat & XEN_NOPV_ALL;
> +}

Should XEN_NOPV_ALL be the 'OR' of the other two? I think it implies 
them but is broader than that. We may decide to have NOPV_IPI and 
NOPV_SPIN but still run a Xen-aware guest (i.e. we want to return 'true' 
from xen_platform()).

(Besides, this will return true if only one of the two bits is set.)

> +
> +bool xen_no_pvipi(void)
> +{
> +	return xen_nopv_feat & XEN_NOPV_IPI;
> +}

I don't see anyone using this.

Also, I think these should be inlines.


-boris

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH] Use vAPIC when doing IPI for PVHVM guests. Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2015-10-07 22:30 +0200
  [RFC PATCH v1 2/2] xen_nopv: Combine a bunch of the PV features that can be disabled Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2015-10-07 22:30 +0200
    Re: [RFC PATCH v1 2/2] xen_nopv: Combine a bunch of the PV features  that can be disabled Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2015-10-07 23:40 +0200
  Re: [RFC PATCH] Use vAPIC when doing IPI for PVHVM guests. Juergen Gross <jgross@suse.com> - 2015-10-08 07:10 +0200
    Re: [Xen-devel] [RFC PATCH] Use vAPIC when doing IPI for PVHVM guests. Andrew Cooper <andrew.cooper3@citrix.com> - 2015-10-08 11:40 +0200

csiph-web