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

Re: [PATCH 4/5] SVM: sync VM-exit perf counters with known VM-exit reasons


  • To: Andrew Cooper <amc96@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 21 Dec 2021 08:52:34 +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=QzGtaXMffeM96mOfrvw56JTznPM/wBt/181aCM3NtHQ=; b=dTHnAdoj1yfxdRi45XtqtrrwIAsruBa8TE5z+N3S5vTZnzasslZmB3dauMFxYbwqvsFHMgK++7DUvYrt4nc2EFnMmrT7lLDmGwq+0VRevTPPCSY4ytdigbPsYyxMHhRbLj2GOafq0gCnfTcpy+w/K2BnKrG2nKQK+N6ZMUhfri91DLPEc47AbmV4Y4SjHQmxsAWQXMPbChSw7j0OEqQxteEHJnKaFItwUKkiozjo60dhzLCAS1Pqh6ybzaG77XCU5xB83rPiAZy2oZGv9XENkb+nKsOz4GeXkywEjCveFeu1yJagXFbOZOV9wuRXbX0d4x8jo3OqLIaBHvzFDJ5shg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aQE2x6RMjRJMU07SvqCYXpKS3obo1KgZAtiSzuYcr79LJi9XmrMUz1pXa7aKLdiC0lCIPnsn5IKJntW2t5ESFxNBImZMeMwv9BT3z3B+geyjNVZWoW75IpwlkEjydXLlqdDJAIzdJi7QPdoA+T7fk4Ubla1a/Py07Dj+ubGUVI3ZOHxd0W00HkSO90O3biRjKgAR8Qm6E/TlxSHT9Oa5M3v4BQHbtaAU0fHehkbLXR3QVcvP3LkUdi2nIi/HEmDqo5ZUCdJzDnY3zDKXbP4hx9JwgJxXANF6moSpf3IT1Ko3H/Ft899e1dUC4Kx9Pe2ovfNkwleD3/fLUXnX0HHKWg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 21 Dec 2021 07:52:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.12.2021 16:02, Andrew Cooper wrote:
> On 03/12/2021 12:06, Jan Beulich wrote:
>> This has gone out of sync over time, resulting in NPF and XSETBV exits
>> incrementing the same counter. Introduce a simplistic mechanism to
>> hopefully keep things in better sync going forward.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>> ---
>> Given their large (and growing) number, I wonder whether we shouldn't
>> fold "SVMexits" and "vmexits". They can't both be active at the same
>> time.
> 
> Oh yeah - that's just silly having them split like this, especially as
> there's no associated element name.

Okay, will do. Albeit I was thinking to add naming to xenperf ...

>> --- a/xen/include/asm-x86/perfc_defn.h
>> +++ b/xen/include/asm-x86/perfc_defn.h
>> @@ -11,8 +11,8 @@ PERFCOUNTER_ARRAY(exceptions,
>>  PERFCOUNTER_ARRAY(vmexits,              "vmexits", 
>> VMX_PERF_EXIT_REASON_SIZE)
>>  PERFCOUNTER_ARRAY(cause_vector,         "cause vector", 
>> VMX_PERF_VECTOR_SIZE)
>>  
>> -#define VMEXIT_NPF_PERFC 141
>> -#define SVM_PERF_EXIT_REASON_SIZE (1+141)
>> +#define VMEXIT_NPF_PERFC 143
>> +#define SVM_PERF_EXIT_REASON_SIZE (VMEXIT_NPF_PERFC + 1)
> 
> How does this work in the first place?  perfc_incra() is still passed 1024.

In

    case VMEXIT_NPF:
        perfc_incra(svmexits, VMEXIT_NPF_PERFC);

I don't see any use of 1024. And the earlier blanket

    perfc_incra(svmexits, exit_reason);

doesn't do anything afaict, due to how perfc_incra() works.

> Furthermore, it's already worse than this.
> 
> 401/402 are AVIC exits, and 403 is an SEV exit.

In which way is this "worse"? We don't support either AVIC or SEV (which
is a shame in particular for the former, but what do you do with vendors
having given up all engagement).

>  We've also gained -2 as "busy" for transient SEV events too.

I'm sorry, I'm not enough up to speed with SEV yet to even vaguely know
what you're referring to here.

Jan




 


Rackspace

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