From nobody Fri Oct 18 06:16:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1541423002795552.4341762373094; Mon, 5 Nov 2018 05:03:22 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E58D937E60; Mon, 5 Nov 2018 13:03:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 76612450D; Mon, 5 Nov 2018 13:03:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1BCEE4CAA0; Mon, 5 Nov 2018 13:03:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wA5CwOeU004294 for ; Mon, 5 Nov 2018 07:58:24 -0500 Received: by smtp.corp.redhat.com (Postfix) id 77D772638F; Mon, 5 Nov 2018 12:58:24 +0000 (UTC) Received: from unknown4CEB42C824F4.redhat.com (ovpn-116-143.phx2.redhat.com [10.3.116.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3340C18522 for ; Mon, 5 Nov 2018 12:58:24 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Mon, 5 Nov 2018 07:58:08 -0500 Message-Id: <20181105125816.20385-5-jferlan@redhat.com> In-Reply-To: <20181105125816.20385-1-jferlan@redhat.com> References: <20181105125816.20385-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [REPOST PATCH v2 04/12] virsh: Add ability to display IOThread stats X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 05 Nov 2018 13:03:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Add an --iothread qualifier to domstats and an explanation in the man page. Describe the values in as generic terms as possible allowing each hypervisor to provide a specific algorithm to utilize the values as it sees fit. Signed-off-by: John Ferlan ACKed-by: Michal Privoznik --- tools/virsh-domain-monitor.c | 7 +++++++ tools/virsh.pod | 26 ++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 3a2636377d..5187c1e248 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -2066,6 +2066,10 @@ static const vshCmdOptDef opts_domstats[] =3D { .type =3D VSH_OT_BOOL, .help =3D N_("report domain perf event statistics"), }, + {.name =3D "iothread", + .type =3D VSH_OT_BOOL, + .help =3D N_("report domain IOThread information"), + }, {.name =3D "list-active", .type =3D VSH_OT_BOOL, .help =3D N_("list only active domains"), @@ -2179,6 +2183,9 @@ cmdDomstats(vshControl *ctl, const vshCmd *cmd) if (vshCommandOptBool(cmd, "perf")) stats |=3D VIR_DOMAIN_STATS_PERF; =20 + if (vshCommandOptBool(cmd, "iothread")) + stats |=3D VIR_DOMAIN_STATS_IOTHREAD; + if (vshCommandOptBool(cmd, "list-active")) flags |=3D VIR_CONNECT_GET_ALL_DOMAINS_STATS_ACTIVE; =20 diff --git a/tools/virsh.pod b/tools/virsh.pod index 86c041d575..90f3c1ef5c 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -975,7 +975,8 @@ or unique source names printed by this command. =20 =3Ditem B [I<--raw>] [I<--enforce>] [I<--backing>] [I<--nowait>] [I<--state>] [I<--cpu-total>] [I<--balloon>] [I<--vcpu>] [I<--interface>] -[I<--block>] [I<--perf>] [[I<--list-active>] [I<--list-inactive>] +[I<--block>] [I<--perf>] [I<--iothread>] +[[I<--list-active>] [I<--list-inactive>] [I<--list-persistent>] [I<--list-transient>] [I<--list-running>] [I<--list-paused>] [I<--list-shutoff>] [I<--list-other>]] | [I ...] =20 @@ -993,7 +994,7 @@ behavior use the I<--raw> flag. The individual statistics groups are selectable via specific flags. By default all supported statistics groups are returned. Supported statistics groups flags are: I<--state>, I<--cpu-total>, I<--balloon>, -I<--vcpu>, I<--interface>, I<--block>, I<--perf>. +I<--vcpu>, I<--interface>, I<--block>, I<--perf>, I<--iothread>. =20 Note that - depending on the hypervisor type and version or the domain sta= te - not all of the following statistics may be returned. @@ -1126,6 +1127,27 @@ Information listed includes: VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD event See domblkthreshold. =20 +I<--iothread> returns information about IOThreads on the running guest +if supported by the hypervisor. + +The "poll-max-ns" for each thread is the maximum nanoseconds to allow +each polling interval to occur. A polling interval is a period of time +allowed for a thread to process data before being the guest gives up +its CPU quantum back to the host. A value set too small will not allow +the IOThread to run long enough on a CPU to process data. A value set +too high will consume too much CPU time per IOThread failing to allow +other threads running on the CPU to get time. The polling interval is +not available for statistical purposes. + + "iothread..poll-max-ns" - maximum polling time in nanoseconds used + by the IOThread. A value of 0 (zero) + indicates polling is disabled. + "iothread..poll-grow" - polling time grow value. A value of 0 (zero) + indicates growth is managed by the hypervisor. + "iothread..poll-shrink" - polling time shrink value. A value of + 0 (zero) indicates shrink is managed by + the hypervisor. + Selecting a specific statistics groups doesn't guarantee that the daemon supports the selected group of stats. Flag I<--enforce> forces the command to fail if the daemon doesn't support the --=20 2.17.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list