From nobody Mon May 6 05:20:27 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15269832803011008.8046310645866; Tue, 22 May 2018 03:01:20 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 39F603003A31; Tue, 22 May 2018 10:01:18 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6D4582010CA3; Tue, 22 May 2018 10:01:17 +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 30B57180B536; Tue, 22 May 2018 10:01:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4M9t4Js020902 for ; Tue, 22 May 2018 05:55:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8D1435E9C1; Tue, 22 May 2018 09:55:04 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 80954610C9 for ; Tue, 22 May 2018 09:55:00 +0000 (UTC) Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4B0B431527 for ; Tue, 22 May 2018 09:54:49 +0000 (UTC) Received: by mail-wr0-f196.google.com with SMTP id y15-v6so18990949wrg.11 for ; Tue, 22 May 2018 02:54:49 -0700 (PDT) Received: from rolandPC.redhat.com ([213.175.37.12]) by smtp.gmail.com with ESMTPSA id s7-v6sm1489426wrp.4.2018.05.22.02.54.47 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 May 2018 02:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=oFAmXkk39Cj+/1mcFNEBpH/sPMwSciNaur+XVVdr+SE=; b=jEhKxKsUqJTeWP/ZY16hlJcdwR/lv1XCLP5j50vxpVQZyNSRRWWShSyzl1he0u2C2I Ys4CCWvWczEZhJ45UYDu91jPdCX++53hb2priJ583Ej97o9Jl5RIaTy9ouRuGMiFGjjU yccY0uG6p5ST7RPXBj1133QPl7FCzpQG/zkESpB/ZcNybAVx1TYfYA5b5JFAADK7C9yO SsaH0JJvROORddZduthgxfTLxbEch7RJjfanYhXHwEPQJNjHQItCfuemm+RtW1RQolhR O7zxuB6vz8yzPOh3+1CjIg0csGyQPJahH2vc/7/m3j3Id29C5Wg1tdVEr3+wCH+/IcZL pyOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=oFAmXkk39Cj+/1mcFNEBpH/sPMwSciNaur+XVVdr+SE=; b=Wugfl2kromKEzBwKXnOKH0Un3EMpuzePbs8rn/amFT6wZqh/q20Mw4kiHmwvuyJNEn kQ8y4/dDoWWSgHz3JNkiJA05+Rh/R2yndaurjPXQ7gSxUdYby60AhFIyuRQ5m0egnF2M a0pddEjirvd2KBYuvhyy2qaomeAJ3quu/uMogyKNZfDnSPHljqChnl1+dZM0u7cvdIgr MP9Z581x2PabmcKLjX7L+QFJrvO4J8BmKfAtSLjEplMszcNbRkM2lpLILOF9uFYRJ/pS yH0BoWtEwzmIs/yBbVjRxH/oER36EJtAulRlEnSdoVHmuXa3Fy15jRgW9JCVlHqS8K7J IP9w== X-Gm-Message-State: ALKqPwdfhaZZrSX0F1d7+FP8MuZD/9XGmGsPZBcac6MhcfmcgLz+o88k PDm4NDAqDl53jVphrYBvhCCC5Q== X-Google-Smtp-Source: AB8JxZr2Lv3u3EKO8JmascRlfGDi7TpsmD34v/dJIUZIn8YIfoYi7GljPHD2u3IaieWx2MpL0BZCCg== X-Received: by 2002:adf:a0b8:: with SMTP id m53-v6mr18179353wrm.269.1526982887860; Tue, 22 May 2018 02:54:47 -0700 (PDT) From: Roland Schulz To: libvir-list@redhat.com Date: Tue, 22 May 2018 11:54:44 +0200 Message-Id: <20180522095445.28971-2-schullzroll@gmail.com> In-Reply-To: <20180522095445.28971-1-schullzroll@gmail.com> References: <20180522095445.28971-1-schullzroll@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 22 May 2018 09:54:49 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 22 May 2018 09:54:49 +0000 (UTC) for IP:'209.85.128.196' DOMAIN:'mail-wr0-f196.google.com' HELO:'mail-wr0-f196.google.com' FROM:'schullzroll@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.496 (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS, T_DKIM_INVALID) 209.85.128.196 mail-wr0-f196.google.com 209.85.128.196 mail-wr0-f196.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] Add NUMA support to virshAllocpagesPagesizeCompleter. 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.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 22 May 2018 10:01:19 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Roland Schulz --- tools/virsh-completer.c | 15 ++++++++++++++- tools/virsh-host.c | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c index 2816e7b76..21c73f048 100644 --- a/tools/virsh-completer.c +++ b/tools/virsh-completer.c @@ -579,6 +579,9 @@ virshAllocpagesPagesizeCompleter(vshControl *ctl, double size =3D 0; size_t i =3D 0; const char *suffix =3D NULL; + const char *cellnum =3D NULL; + bool cellno =3D vshCommandOptBool(cmd, "cellno"); + char *path =3D NULL; char *pagesize =3D NULL; char *cap_xml =3D NULL; char **ret =3D NULL; @@ -595,7 +598,17 @@ virshAllocpagesPagesizeCompleter(vshControl *ctl, if (!(virXMLParseStringCtxt(cap_xml, _("capabilities"), &ctxt))) goto error; =20 - npages =3D virXPathNodeSet("/capabilities/host/cpu/pages", ctxt, &page= s); + if (cellno && vshCommandOptStringQuiet(ctl, cmd, "cellno", &cellnum) >= 0) { + if (virAsprintf(&path, + "/capabilities/host/topology/cells/cell[@id=3D\"%s= \"]/pages", + cellnum) < 0) + goto error; + } + else + if (virAsprintf(&path, "/capabilities/host/cpu/pages") < 0) + goto error; + + npages =3D virXPathNodeSet(path, ctxt, &pages); if (npages <=3D 0) goto error; =20 diff --git a/tools/virsh-host.c b/tools/virsh-host.c index 293f06e9e..793a10452 100644 --- a/tools/virsh-host.c +++ b/tools/virsh-host.c @@ -473,7 +473,7 @@ static const vshCmdOptDef opts_allocpages[] =3D { .type =3D VSH_OT_INT, .flags =3D VSH_OFLAG_REQ, .completer =3D virshAllocpagesPagesizeCompleter, - .help =3D N_("page size (in kibibytes)") + .help =3D N_("page size") }, {.name =3D "pagecount", .type =3D VSH_OT_INT, --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon May 6 05:20:27 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; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526982925686857.3577248698084; Tue, 22 May 2018 02:55:25 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F207AC0F56E8; Tue, 22 May 2018 09:55:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9030463150; Tue, 22 May 2018 09:55:23 +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 A93871801250; Tue, 22 May 2018 09:55:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4M9t4pO020894 for ; Tue, 22 May 2018 05:55:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 557E6601A3; Tue, 22 May 2018 09:55:04 +0000 (UTC) Received: from mx1.redhat.com (ext-mx18.extmail.prod.ext.phx2.redhat.com [10.5.110.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4B0A26017F for ; Tue, 22 May 2018 09:55:01 +0000 (UTC) Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 42BE430D0C4B for ; Tue, 22 May 2018 09:54:50 +0000 (UTC) Received: by mail-wm0-f49.google.com with SMTP id n10-v6so31666408wmc.1 for ; Tue, 22 May 2018 02:54:50 -0700 (PDT) Received: from rolandPC.redhat.com ([213.175.37.12]) by smtp.gmail.com with ESMTPSA id s7-v6sm1489426wrp.4.2018.05.22.02.54.47 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 May 2018 02:54:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=dZ2+0zu/RjLROlvWHwh2fLjvBoHBDXsMu6gHqmffR/o=; b=VGA6ZyKnbGGGHsesBGYXtdPARD2DX6vYCwxTY3Wnq2/NdJ3XmnyL92gKv7huMaZ12c BpAb1rpgb+QHQQUWzmTACMz+extbSKum9tqhTjNEVswhJ/ELCWaSyHJoNBGVyuH1WlQW nRQTp1+hP/XoMxTefL6orqiF4f4hXh8Se9Ngq2miuQP9nX8bC284D3ouVPHttE+pcBuY CfUMmDZKuYgqc+o83eRz3QJVDH/lDtV8jghFe6zKIurIqyv++Y0ZFgMf0Itio/U0VgHX TpAAGDmXrJk8s88bpMnpfwBIlMGIgdiyK/j+83QhIejdXvNjRyVH3mPWY61+b2nmwYjV FJCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=dZ2+0zu/RjLROlvWHwh2fLjvBoHBDXsMu6gHqmffR/o=; b=BZ6FZmj76WaZClYnDeVBF64UDq94oG3fDYVBxNmt+UXJxSvqZclU6hY35LqMyqINaZ ad8hzRbk4GiReuEeXP5u/3aIIuEhCj8qmod+5Giw/kCKrS9wTBtAjpM8oLVIPYSdbgRV 5JyQ7Jahb+07TObD0Xg3bnRmhVJusyJQ7KgbiGj2yh+aZf1YAU8xNl2XP9l0xX/1oAIl GftaVJzdex7mc6QFYAH3X0pQtU+jJQferKlTST4SJ7x+FiSLDdFxj1Ev3Tm+J1KzJSQ+ wPZfDLaOvhwrsrP29uiN9ahcSyyL3dEnoxQLkD3BfliBZR/NB8+fDp6+8O62l15d1ohL 4+Sg== X-Gm-Message-State: ALKqPwdRKRSXUVhdbFY58iJz5TRVobK9A0HZcPpMhYxtBK46MWB5zGUa cvqbxCBUApwOdUqhNhmnetA+qA== X-Google-Smtp-Source: AB8JxZpl1hqFA56K08gjmVDdofa+4fQ24m4DpnJ2VDGCSTYIOW46tNWXEokt2lyH629mEM7/aKPd0g== X-Received: by 2002:a1c:5f83:: with SMTP id t125-v6mr647920wmb.124.1526982888782; Tue, 22 May 2018 02:54:48 -0700 (PDT) From: Roland Schulz To: libvir-list@redhat.com Date: Tue, 22 May 2018 11:54:45 +0200 Message-Id: <20180522095445.28971-3-schullzroll@gmail.com> In-Reply-To: <20180522095445.28971-1-schullzroll@gmail.com> References: <20180522095445.28971-1-schullzroll@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 22 May 2018 09:54:50 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 22 May 2018 09:54:50 +0000 (UTC) for IP:'74.125.82.49' DOMAIN:'mail-wm0-f49.google.com' HELO:'mail-wm0-f49.google.com' FROM:'schullzroll@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 74.125.82.49 mail-wm0-f49.google.com 74.125.82.49 mail-wm0-f49.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.47 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] Edit test capabilities to contain different cell pagesizes. 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.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 22 May 2018 09:55:24 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Roland Schulz --- src/test/test_driver.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 467587b19..40c366cb8 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -322,24 +322,27 @@ testBuildCapabilities(virConnectPtr conn) if (virCapabilitiesAddHostFeature(caps, "nonpae") < 0) goto error; =20 - if (VIR_ALLOC_N(caps->host.pagesSize, 2) < 0) + if (VIR_ALLOC_N(caps->host.pagesSize, 3) < 0) goto error; =20 caps->host.pagesSize[caps->host.nPagesSize++] =3D 4; caps->host.pagesSize[caps->host.nPagesSize++] =3D 2048; + caps->host.pagesSize[caps->host.nPagesSize++] =3D 1024 * 1024; =20 for (i =3D 0; i < privconn->numCells; i++) { virCapsHostNUMACellCPUPtr cpu_cells; virCapsHostNUMACellPageInfoPtr pages; - size_t nPages; + size_t nPages =3D caps->host.nPagesSize; =20 if (VIR_ALLOC_N(cpu_cells, privconn->cells[i].numCpus) < 0 || VIR_ALLOC_N(pages, caps->host.nPagesSize) < 0) { VIR_FREE(cpu_cells); goto error; } - - nPages =3D caps->host.nPagesSize; + if (i =3D=3D 1) { + nPages--; + caps->host.pagesSize[caps->host.nPagesSize - 3] =3D 8; + } =20 memcpy(cpu_cells, privconn->cells[i].cpus, sizeof(*cpu_cells) * privconn->cells[i].numCpus); --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list