[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[4.16?] Re: [PATCH v2 13/15] xen/x86: add hypercall performance counters for hvm, correct pv


  • To: Ian Jackson <iwj@xxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 4 Nov 2021 10:31:48 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YowYuaSMRJ/uJ0Zf0DC1BaJOVZ2nWimwP7x/ERMX9NI=; b=kXRxht7Ksvuqq4/Y3BDwVs2Oz6BIetvvF8uBPRsCHJsozyu6pQTdo2HvBVmZccSq3jYneoVVG4gLfSHVKkKB/k8wSMe0vaccRETKe05OI68AEi/yLHT/OaEXv30gxdnkqVDaqszoWVTW2WMPzAazMG/gOrliNG5RrXgQWNbEJxylCGGcBplQr6C+dBeVmYmVndNTmLCRtFeOoixTfrxvWJ+OCvHaIStrbDTdAf9BqAokRXO+sYXWLkWYX6Hsv3gnHis1Uk2sS9XNQ5YnvRCLeuVl/LDJ9dSjOh4kmQd4egqKqiN1oHiJjt920S03F8/ClaFcjvbSiqjemGRR+GFxUw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HJafmPF6+EtjRZG41nDVc2yo1q+UfAInnauRZqL5D0dy3wALsBU3E3neXuqTaLFkqlBoASeTZPyHIVoMvgaBiPhArm3AA8tAt6vxceGeLWfoVtRLCb34gYG5D2dn0W1iTKahNafmMR5LZ0rzkk724PQtMH0g50a92ONfIL2JNhd93XfVxcS+j4faJNK5ynyggZBJgoxPQhvTqWNYUULjB+zOKocpELXhDalsRzhAroQuMTL7YPESgZPUn+enUzwxywD8HRgDL7jNX3bgRb3GKetikiQDwpixTB6vv7et54JgiNyl2BSDNoxIxBbO8DpqVAHJ9C3nLhO2ENAPmX83HQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Thu, 04 Nov 2021 09:32:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Ian,

On 01.11.2021 16:20, Juergen Gross wrote:
> The HVM hypercall handler is missing incrementing the per hypercall
> counters. Add that.
> 
> The counters for PV are handled wrong, as they are not using
> perf_incra() with the number of the hypercall as index, but are
> incrementing the first hypercall entry (set_trap_table) for each
> hypercall. Fix that.
> 
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

this looks to be independent of all earlier patches in this series,
and I'd like to suggest to at least consider taking this as a low-
risk bug fix for 4.16. Thoughts?

Jan

> ---
>  xen/arch/x86/hvm/hypercall.c | 2 ++
>  xen/arch/x86/pv/hypercall.c  | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c
> index 6d8d6693dc..1bac5d4d44 100644
> --- a/xen/arch/x86/hvm/hypercall.c
> +++ b/xen/arch/x86/hvm/hypercall.c
> @@ -210,6 +210,8 @@ int hvm_hypercall(struct cpu_user_regs *regs)
>          ioreq_signal_mapcache_invalidate();
>      }
>  
> +    perfc_incra(hypercalls, eax);
> +
>      return curr->hcall_preempted ? HVM_HCALL_preempted : HVM_HCALL_completed;
>  }
>  
> diff --git a/xen/arch/x86/pv/hypercall.c b/xen/arch/x86/pv/hypercall.c
> index ef92266620..bf64bb41bb 100644
> --- a/xen/arch/x86/pv/hypercall.c
> +++ b/xen/arch/x86/pv/hypercall.c
> @@ -102,7 +102,7 @@ _pv_hypercall(struct cpu_user_regs *regs, bool compat)
>      if ( curr->hcall_preempted )
>          regs->rip -= 2;
>  
> -    perfc_incr(hypercalls);
> +    perfc_incra(hypercalls, eax);
>  }
>  
>  enum mc_disposition pv_do_multicall_call(struct mc_state *state)
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.