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

Re: [PATCH 12/12] xen/x86: add hypercall performance counters for hvm, correct pv


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 21 Oct 2021 17:19:41 +0200
  • 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=+6x5VW58fARZKv4rS4QMHhIKpTUVzW56T5bidJfnKBw=; b=hr7aqMZwajnsXrvN0da767NtFHzXyPAIw3RxYFOsqgXF5Jzcu1vQo6OzluzqAm6aUp8DpGLsgyHX0a3W+AxDR9rJh1SnmoMIPE0bUm+tMHLx3tE0zCuOb+qfPvKZd8scHkwhegvWGGnHut+zEPb/22D/+hWpNVIUBsMqEmTb8SWgovOCIjKpRg9XRJl3Em5kkARmldQmvCrgrHbn3vvcvqwOt9rrpzmowWitYUntIiEsBhcBjcJ8LX1zjchWKjXea3FrDOYpQLfBAA7Rw0GdgjbjCM0Q7hAkLcEUc6mZAvT1+FakijyitZmcuRZyc3l7aEzE+4N3lOMSshQwgKyrKQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CLM8BaiU1wZcIR6VuNg6j/5jKqllf161yOaioZ1obIzj+kXy9UuVo0DDlv+8itUBJ8A0Zw84OUX/2uz2VdIYsAgJsjd0u+hMFbzMey/bEU8uZKGEk0wXQIE5XmjZdwlx68i16ays04UDIqapxYKMVbr/wJNto9H/bWgsx7SaiPqyfkR/iCH38lkwqlTNlXuTupNen1a3WoBJM+c9bxXayt+8mBu2teTKzNWjnlUL693nu5RoD+k2+d9s9xqzVi+vPtze4iW7Gfn8F1zGEkI+tZOwUqoBDhnWwO1QtWzIzgaaN4cpg8ea14zOpWFxeDdaktdqHMvzaPa/QnhTD+7x0w==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; 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
  • Delivery-date: Thu, 21 Oct 2021 15:20:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.10.2021 14:51, 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 total number of hypercalls only. Fix that.

Why do you say "total number"? Isn't it that all accounting goes into
set_trap_table's slot, effectively making that slot a "total number"
despite not being labeled that way?

Also this fix renders largely redundant the calls_to_multicall counter.
Could I talk you into deleting that at the same time? (As to the "not
fully redundant": I consider it suspicious that this counter gets
incremented at the bottom of the function, not at the top.)

Finally I take it that with the Kconfig setting being under DEBUG, we
don't consider security supported builds with PERF_COUNTERS enabled.
Otherwise as a prereq I would think perfc_incra() would need teaching
of array_index_nospec().

In any event, preferably with at least the description slightly
adjusted,
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan




 


Rackspace

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