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

Re: [RFC PATCH v1 0/2] Add a new acquire resource to query vcpu statistics


  • To: Matias Ezequiel Vara Larsen <matiasevara@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 29 Sep 2022 17:55:50 +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=tTJ0JxJTsuGT4ZSkMcbdE9s23cbnZWxbni1648Q9U0k=; b=L2IAvtzvYy48zM/aJq8tMONakdnFh5o0Y7WXqaIbnKFFV/kA2wdpGAxKAi/rKBETtGVluzLZZvHS35vJiB5ubak7VAqBClrkksztuuKTf2Hb+yivoHrlLdRLiVexhPcvT9a4LSUhqbSwy3tMuIVRzdgWAN3ajYFeaXTq3Mu4WQr/adUG/4Tey4K50atE4jx+Jd6W8s1yh7SVVjo5S4nQ7kZ6Y7JRma3n7Fi5MCWRZW/cVXY86/avfBoCkDFFORPx7WaApaoQib5/K1u6pswiK0vEzJ9hQ75m0Wfv9vR5rt5tRoMCR9YB+VVHxV4xEXwg5T4fFqZJOdkbX32H3ZT6UA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fdxf3/w43/9yBQaMh3z+KZfjVmWDwPulXFOqpuo3WvIqQD3VTkzYbYO6aTDLoy3gFzX61f0LCN2CaM+bdwDZlc8pCbMEfHTAFHr18yokR+ODw4xyRPxlv/1uXW+tPo8uizkIg97JbbgtNLgKGGTa76ZgsOD6Q2pa631yac8r6BloKgk76Ic+SOO0o57tbungB4fNYmBRDCI3WieqwpmCeX+qmhid/MSEYYG80DG6mxzajY9OjKXjV14LmAjkc/mtqJg1ebXdEaU5RRiJRVV40WEfpTHRjWg9tr24RwtScL/KVZ1mKFsFOgt2ZjrW0pKitD4DKfaFtWikAFffk69r4A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Matias Ezequiel Vara Larsen <matias.vara@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 29 Sep 2022 15:55:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.08.2022 15:27, Matias Ezequiel Vara Larsen wrote:
> The purpose of this RFC is to get feedback about a new acquire resource that
> exposes vcpu statistics for a given domain. The current mechanism to get those
> statistics is by querying the hypervisor. This mechanism relies on a hypercall
> and holds the domctl spinlock during its execution. When a pv tool like 
> xcp-rrdd
> periodically samples these counters, it ends up affecting other paths that 
> share
> that spinlock. By using acquire resources, the pv tool only requires a few
> hypercalls to set the shared memory region and samples are got without issuing
> any other hypercall. The original idea has been suggested by Andrew Cooper to
> which I have been discussing about how to implement the current PoC. You can
> find the RFC patch series at [1]. The series is rebased on top of stable-4.15.
> 
> I am currently a bit blocked on 1) what to expose and 2) how to expose it. For
> 1), I decided to expose what xcp-rrdd is querying, e.g., 
> XEN_DOMCTL_getvcpuinfo.
> More precisely, xcp-rrd gets runstate.time[RUNSTATE_running]. This is a 
> uint64_t
> counter. However, the time spent in other states may be interesting too.
> Regarding 2), I am not sure if simply using an array of uint64_t is enough or 
> if
> a different interface should be exposed. The remaining question is when to get
> new values. For the moment, I am updating this counter during
> vcpu_runstate_change().
> 
> The current series includes a simple pv tool that shows how this new 
> interface is
> used. This tool maps the counter and periodically samples it.
> 
> Any feedback/help would be appreciated.

Before looking more closely - was there perhaps kind-of-review feedback
during the summit, which would make it more reasonable to look through
this once a v2 has appeared?

Jan



 


Rackspace

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