From nobody Sun May 5 11:29:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639670508; cv=none; d=zohomail.com; s=zohoarc; b=QoyA6yBjxm8+rFidGt9WbQF3bp6iqkuCFIlUo3YXzRQc8FJcnHclUBQnhSwiN0rDz/5YHUDblGS65LhcBwWbFnJTjtnTK4FU6X/H8Q46Y6kXEVHjJbdJeGb0kC79LnJLHsjnLD/RxAVhWZXZmA5DLbPzWmCf7g+CL4mhpPiuaAE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639670508; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TNdak/37z2jKhM6Wmrpgto3kiAeAg2Q1mKZAwQEbqfk=; b=OuChCFuhXAG05X0yCQ2bgpiGzKw/7eZhUZ5wXK02fgGzD/o42LFsqtfWNo0y+zalKC5XWzhIAaZHJZY14RnZgxH5XcKIN55ePc/cMD2QfzNqpJCC7A96S/N2Sp3Kw23bUSMMwJg+bKzXUTlAgHpr20v+f7zOgHniKbZ5AKAwFRA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1639670507997380.3021906487289; Thu, 16 Dec 2021 08:01:47 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-46-JNuSlaFJNqCiL7wozwWZDQ-1; Thu, 16 Dec 2021 11:01:39 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C093A12E53F4; Thu, 16 Dec 2021 16:01:32 +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 9F96D1037F3F; Thu, 16 Dec 2021 16:01:32 +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 6DCCA180B617; Thu, 16 Dec 2021 16:01:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BGG18nt005482 for ; Thu, 16 Dec 2021 11:01:08 -0500 Received: by smtp.corp.redhat.com (Postfix) id E0BD61037F3D; Thu, 16 Dec 2021 16:01:08 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 693A11037F39 for ; Thu, 16 Dec 2021 16:01:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639670506; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=TNdak/37z2jKhM6Wmrpgto3kiAeAg2Q1mKZAwQEbqfk=; b=UuEB1V0jk3xa8XNnwjUwAZu7hH0MZHNyXrlpOdEpoTw5uzDM0XXvo7BhFYGKasTpYlOoCb bkU9QjDGRdT4bE/RicJfalxImypx95RICC66gO0fk0GlbynUu1Hm0J/+lnsT8Uoq04ZBf1 v2PuNo5fKJdQddrtNwmEgM5qbEzNK1w= X-MC-Unique: JNuSlaFJNqCiL7wozwWZDQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 1/6] manpages: Document 'restrictive' mode for numatune Date: Thu, 16 Dec 2021 17:01:01 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639670531870100003 Content-Type: text/plain; charset="utf-8" While we document possibility of passing an integer from virDomainNumatuneMemMode enum, we list string variants to only the first three enum members. The fourth (and so far the last) member is called 'restrictive' and thus should be documented. Signed-off-by: Michal Privoznik Reviewed-by: Pavel Hrdina --- docs/manpages/virsh.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 611a6271cf..cd739c32c4 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -3545,11 +3545,11 @@ Set or get a domain's numa parameters, correspondin= g to the element of domain XML. Without flags, the current settings are displayed. =20 -*mode* can be one of \`strict', \`interleave' and \`preferred' or any -valid number from the virDomainNumatuneMemMode enum in case the daemon -supports it. For a running domain, the mode can't be changed, and the -nodeset can be changed only if the domain was started with a mode of -\`strict'. +*mode* can be one of \`strict', \`interleave', \`preferred' and +\'restrictive' or any valid number from the virDomainNumatuneMemMode enum +in case the daemon supports it. For a running domain, the mode can't be +changed, and the nodeset can be changed only if the domain was started with +a mode of \`strict'. =20 *nodeset* is a list of numa nodes used by the host for running the domain. Its syntax is a comma separated list, with '-' for ranges and '^' for --=20 2.32.0 From nobody Sun May 5 11:29:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639670483; cv=none; d=zohomail.com; s=zohoarc; b=lifbdOFYatLWbsNBNRfIGmIIYLajBA9S3vTlwIH3vkC3b/ZPCtwmLM2B0dr746gFOxV+7N2rRYVrGYTzHAfF+Xnw3El3vE8yjU8xgFk02tIgrS/U6VBx+HqSMqQDM+PF5WFV+H9qOaDuSvTQQNzWBlAqafjl7NB8luVvtEGnKEk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639670483; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VnVaVnLygBmZMiOeTN2Q/UffFnu4ghZnnOwyAVo1hqM=; b=Fk2mrdb3FX7GIgbLnSHIYHaN+cbAWFzaL8rCfinaplZAONoJfxV6uq/X3sW3BWx365wyeGJ55aJFvGslT+MLjThn2v47RLvBwNiybOtRoOt1HhddpQnjOoj9dO7AIekavGaozRqg9sxJNQejdngwihTNGvKpxkyIZROQA5RWGIE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1639670483394271.26804843172727; Thu, 16 Dec 2021 08:01:23 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-608-Aqo9TpiANhqZ5GM7nDUJLg-1; Thu, 16 Dec 2021 11:01:20 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A0A4D10168C0; Thu, 16 Dec 2021 16:01:14 +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 131B61037F3F; Thu, 16 Dec 2021 16:01:14 +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 3F56B1809CB8; Thu, 16 Dec 2021 16:01:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BGG19LQ005490 for ; Thu, 16 Dec 2021 11:01:09 -0500 Received: by smtp.corp.redhat.com (Postfix) id B3A45101E5BF; Thu, 16 Dec 2021 16:01:09 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3B2851037F3D for ; Thu, 16 Dec 2021 16:01:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639670482; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=VnVaVnLygBmZMiOeTN2Q/UffFnu4ghZnnOwyAVo1hqM=; b=OcuJdlUn2qDjon3n5dcHlJLxjrnmNO+KdV9XX9ywCzoT7mlyFAdTOC+HNGMcajvP9T0zM0 TvvZLjoO8aUPSSUC3LfleYB3+KettdccXEfF7qa1Ekhjjf9jyqNFzmEdpLat7kl3FY27Nd b2Hg9ggprbur1fp8MWDusqFtI/+Kgus= X-MC-Unique: Aqo9TpiANhqZ5GM7nDUJLg-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 2/6] virsh-completer: Provide completer for numatune --mode Date: Thu, 16 Dec 2021 17:01:02 +0100 Message-Id: <1b66991e62910b82e57ddad4c84494f0812e1d6f.1639670292.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639670502766100001 Content-Type: text/plain; charset="utf-8" The completer is trivial, just iterate over virDomainNumatuneMemMode enum and convert each integer into its string comrade. Signed-off-by: Michal Privoznik Reviewed-by: Pavel Hrdina --- tools/virsh-completer-domain.c | 20 ++++++++++++++++++++ tools/virsh-completer-domain.h | 5 +++++ tools/virsh-domain.c | 1 + 3 files changed, 26 insertions(+) diff --git a/tools/virsh-completer-domain.c b/tools/virsh-completer-domain.c index 93e992e9b1..b4e744c1ba 100644 --- a/tools/virsh-completer-domain.c +++ b/tools/virsh-completer-domain.c @@ -37,6 +37,7 @@ #include "virkeynametable_osx.h" #include "virkeynametable_win32.h" #include "conf/storage_conf.h" +#include "conf/numa_conf.h" =20 char ** virshDomainNameCompleter(vshControl *ctl, @@ -1130,3 +1131,22 @@ virshDomainStorageFileFormatCompleter(vshControl *ct= l G_GNUC_UNUSED, =20 return ret; } + + +char ** +virshDomainNumatuneModeCompleter(vshControl *ctl G_GNUC_UNUSED, + const vshCmd *cmd G_GNUC_UNUSED, + unsigned int flags) +{ + char **ret =3D NULL; + size_t i; + + virCheckFlags(0, NULL); + + ret =3D g_new0(char *, VIR_DOMAIN_NUMATUNE_MEM_LAST + 1); + + for (i =3D 0; i < VIR_DOMAIN_NUMATUNE_MEM_LAST; i++) + ret[i] =3D g_strdup(virDomainNumatuneMemModeTypeToString(i)); + + return ret; +} diff --git a/tools/virsh-completer-domain.h b/tools/virsh-completer-domain.h index ec7909888e..94bb3b5e5c 100644 --- a/tools/virsh-completer-domain.h +++ b/tools/virsh-completer-domain.h @@ -181,3 +181,8 @@ char ** virshDomainBlockjobBaseTopCompleter(vshControl *ctl, const vshCmd *cmd, unsigned int flags); + +char ** +virshDomainNumatuneModeCompleter(vshControl *ctl, + const vshCmd *cmd, + unsigned int flags); diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index c748fe2ba9..f086c2dd4b 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -9407,6 +9407,7 @@ static const vshCmdOptDef opts_numatune[] =3D { VIRSH_COMMON_OPT_DOMAIN_FULL(0), {.name =3D "mode", .type =3D VSH_OT_STRING, + .completer =3D virshDomainNumatuneModeCompleter, .help =3D N_("NUMA mode, one of strict, preferred and interleave \n" "or a number from the virDomainNumatuneMemMode enum") }, --=20 2.32.0 From nobody Sun May 5 11:29:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639670486; cv=none; d=zohomail.com; s=zohoarc; b=h0A3O8xnXUhGGySwHUYmFTDep6qwnFh/N58AZYBlTt3jdiAMB7spc3fs8DwLlpFq5QHKmybc95UzKrN/BkCJmZ1XsiihefJxZ6M/ylYNhhe1ctcRghIHeJPyqMPiDyvNF18lRu1zYelB4NYyQEiH/p1o2TrUggxZmb0v+SYHlMg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639670486; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WRPVpEsWYJ3JK+H3porQKtlK1uybHhhcu523jArQLgI=; b=euVy3KVc3u6Zh7SfZzMkt9DxHdnL15UvugCOx2Gh4DFmis/eE5N2skYLGt7dVqdVoggXb2SY3eA6kHlCG1zNULroHpyATi/7HEXstGrTcZWJy5MombOQv7i9lES3TaYfriPu5s9GdANqCfhWa6WEe4PxOiePzowkMzoq9s/VKZs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1639670486614311.41585550181526; Thu, 16 Dec 2021 08:01:26 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-45-LnAafd7COTWIFEV2xisHEA-1; Thu, 16 Dec 2021 11:01:21 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 007B81923B82; Thu, 16 Dec 2021 16:01:15 +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 CF13C45D9A; Thu, 16 Dec 2021 16:01:14 +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 6DA301809CBA; Thu, 16 Dec 2021 16:01:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BGG1ADM005502 for ; Thu, 16 Dec 2021 11:01:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id 852BE1037F39; Thu, 16 Dec 2021 16:01:10 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D9031037F3F for ; Thu, 16 Dec 2021 16:01:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639670485; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=WRPVpEsWYJ3JK+H3porQKtlK1uybHhhcu523jArQLgI=; b=J+NZVNcn9aSvlpHwHjX0N0xkDoL6msLo0zPXbfTQewsDgRXIhhIE3K/S/bbI9k4vYLHACY zmE6+jMAnaVzmM4T+fdpm3k/EhUK9zollo0+B+gi+eCy5rRnh/xj4HsviAAyxhD0cb0qOi /rDbmWIZNGyNxK3oj0z61rjKpNvnqdg= X-MC-Unique: LnAafd7COTWIFEV2xisHEA-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 3/6] qemu: Allow VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE in qemuDomainSetNumaParamsLive() Date: Thu, 16 Dec 2021 17:01:03 +0100 Message-Id: <83a6145198a052ff4c94f83bff7cedaba77fe882.1639670293.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639670506221100001 Content-Type: text/plain; charset="utf-8" The whole idea of VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE is that the memory location is restricted only via CGroups and thus can be changed on the fly (which is exactly what qemuDomainSetNumaParamsLive() does. Allow this mode there then. Signed-off-by: Michal Privoznik Reviewed-by: Pavel Hrdina --- docs/formatdomain.rst | 3 +++ docs/manpages/virsh.rst | 2 +- src/libvirt-domain.c | 8 ++++++++ src/qemu/qemu_driver.c | 6 +++--- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 2e9c450606..572ea15b35 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -1127,6 +1127,9 @@ NUMA Node Tuning will be ignored if it's specified. If ``placement`` of ``vcpu`` is 'aut= o', and ``numatune`` is not specified, a default ``numatune`` with ``placem= ent`` 'auto' and ``mode`` 'strict' will be added implicitly. :since:`Since 0.= 9.3` + See `virDomainSetNumaParameters + `__ for mo= re + information on update of this element. ``memnode`` Optional ``memnode`` elements can specify memory allocation policies pe= r each guest NUMA node. For those nodes having no corresponding ``memnode`` el= ement, diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index cd739c32c4..baee508d04 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -3549,7 +3549,7 @@ displayed. \'restrictive' or any valid number from the virDomainNumatuneMemMode enum in case the daemon supports it. For a running domain, the mode can't be changed, and the nodeset can be changed only if the domain was started with -a mode of \`strict'. +a mode of either \`strict' or \`restrictive'. =20 *nodeset* is a list of numa nodes used by the host for running the domain. Its syntax is a comma separated list, with '-' for ranges and '^' for diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 5708ff839b..90b8918bb5 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -2182,6 +2182,14 @@ virDomainGetMemoryParameters(virDomainPtr domain, * Change all or a subset of the numa tunables. * This function may require privileged access to the hypervisor. * + * Changing live configuration may be possible only in some cases. For + * instance, for QEMU driver the mode (VIR_DOMAIN_NUMA_MODE) can not be + * changed, and changing the nodeset (VIR_DOMAIN_NUMA_NODESET) is possible + * only for VIR_DOMAIN_NUMATUNE_MEM_STRICT and + * VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE modes. + * + * Changing persistent configuration does not pose such limitations. + * * Returns -1 in case of error, 0 in case of success. */ int diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index bae8b7c39b..e884dde721 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -8777,10 +8777,10 @@ qemuDomainSetNumaParamsLive(virDomainObj *vm, size_t i =3D 0; =20 if (virDomainNumatuneGetMode(vm->def->numa, -1, &mode) =3D=3D 0 && - mode !=3D VIR_DOMAIN_NUMATUNE_MEM_STRICT) { + mode !=3D VIR_DOMAIN_NUMATUNE_MEM_STRICT && + mode !=3D VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", - _("change of nodeset for running domain " - "requires strict numa mode")); + _("change of nodeset for running domain requires st= rict or restrictive numa mode")); return -1; } =20 --=20 2.32.0 From nobody Sun May 5 11:29:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639670507; cv=none; d=zohomail.com; s=zohoarc; b=Z7Erq4pIKNafuoLWvaJEvKC2r7MCA9SJXi0quk4Fu1pvln5CY4chh/OPly/Eo82yavLNp4jVLqHda7nqftUBjzZva+MvtKb40o4j4EI0V43VTZUr3Of0XP0Df2SdCphkNEEpUUTKd0G/ZsiKciAQxDeMs7W31GXapmRb6S6E9iE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639670507; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Xj8ixoAeUirRmkoMQxAYZ7bfOZQd/3+VUTCz02nzUm0=; b=TPuQwcF9oSkvf6KcceEAt0QkevSicUlsAguXkY9/act6qWvZOZf3eHrUXxkmPpU7KTMqFOJ0EKhtKO9RD493kUlN8LKw3LovPGnPrXl/K/ZG72PMXYYFiqGqk3bdbGenBwTtj+zGR63EbwDUkgf5BBWaeRGagfUabxslWZZFqx4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1639670507504579.3263732650624; Thu, 16 Dec 2021 08:01:47 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-575-3uNVX7sFMN2pVi-K4c7jFA-1; Thu, 16 Dec 2021 11:01:42 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C52D112E53F6; Thu, 16 Dec 2021 16:01:32 +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 A4BA1101E5BF; Thu, 16 Dec 2021 16:01:32 +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 6DCAE4A7C8; Thu, 16 Dec 2021 16:01:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BGG1Bq9005507 for ; Thu, 16 Dec 2021 11:01:11 -0500 Received: by smtp.corp.redhat.com (Postfix) id 571F51037F39; Thu, 16 Dec 2021 16:01:11 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id D338A101E5BF for ; Thu, 16 Dec 2021 16:01:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639670506; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Xj8ixoAeUirRmkoMQxAYZ7bfOZQd/3+VUTCz02nzUm0=; b=hQ2T00Bioe8hsIRflAkmq3FXZTLuO8NFI6sHpzz/2N5FtqOcEsbU79YcPavaLZhu6pWp8s gbLjgZGjiZ+bxgwhWNJUe3Apn0I+zn88lqtjml+Ddbm7gdQb73QtebLYvswDQokLny5GEF hL2oo4loZOrp5mIZneGT1sk8QTbQ6Qc= X-MC-Unique: 3uNVX7sFMN2pVi-K4c7jFA-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 4/6] qemu: Explicitly forbid live changing nodeset for strict numatune Date: Thu, 16 Dec 2021 17:01:04 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639670531658100001 Content-Type: text/plain; charset="utf-8" Let's imagine a guest that's configured with strict numatune: For guests with NUMA: Depending on machine type used (see commit v6.4.0-rc1~75) we generate either: 1) -object '{"qom-type":"memory-backend-ram","id":"ram-node0",\ "size":20971520,"host-nodes":[0],"policy":"preferred"}' \ -numa node,nodeid=3D0,cpus=3D0,memdev=3Dram-node0 or 2) -numa node,nodeid=3D0,cpus=3D0,mem=3D20480 Later, when QEMU boots up and cpuset CGroup controller is available we further restrict QEMU there too. But there's a behaviour difference hidden: while in case 1) QEMU is restricted from beginning, in case 2) it is not and thus it may happen that it will allocate memory from different NUMA node and even though CGroup will try to migrate it, it may fail to do so (e.g. because memory is locked). Therefore, one can argue that case 2) is broken. NB, case 2) is exactly what mode 'restrictive' is for. However, in case 1) we are unable to update QEMU with new host-nodes, simply because it's lacking a command to do so. For guests without NUMA: It's very close to case 2) from above. We have commit v7.10.0-rc1~163 that prevents us from outputting host-nodes when generating memory-backend-* for system memory, but that simply allows QEMU to allocate memory anywhere and then relies on CGroups to move it to desired location. Due to all of this, there is no reliable way to change nodeset for mode 'strict'. Let's forbid it. Signed-off-by: Michal Privoznik Reviewed-by: Pavel Hrdina --- docs/manpages/virsh.rst | 2 +- src/libvirt-domain.c | 3 +-- src/qemu/qemu_driver.c | 35 ++++++++++++++++++++++++----------- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index baee508d04..9decdee925 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -3549,7 +3549,7 @@ displayed. \'restrictive' or any valid number from the virDomainNumatuneMemMode enum in case the daemon supports it. For a running domain, the mode can't be changed, and the nodeset can be changed only if the domain was started with -a mode of either \`strict' or \`restrictive'. +\`restrictive' mode. =20 *nodeset* is a list of numa nodes used by the host for running the domain. Its syntax is a comma separated list, with '-' for ranges and '^' for diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 90b8918bb5..c36874f91e 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -2185,8 +2185,7 @@ virDomainGetMemoryParameters(virDomainPtr domain, * Changing live configuration may be possible only in some cases. For * instance, for QEMU driver the mode (VIR_DOMAIN_NUMA_MODE) can not be * changed, and changing the nodeset (VIR_DOMAIN_NUMA_NODESET) is possible - * only for VIR_DOMAIN_NUMATUNE_MEM_STRICT and - * VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE modes. + * only for VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE mode. * * Changing persistent configuration does not pose such limitations. * diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e884dde721..0354e1474c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -8777,10 +8777,9 @@ qemuDomainSetNumaParamsLive(virDomainObj *vm, size_t i =3D 0; =20 if (virDomainNumatuneGetMode(vm->def->numa, -1, &mode) =3D=3D 0 && - mode !=3D VIR_DOMAIN_NUMATUNE_MEM_STRICT && mode !=3D VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", - _("change of nodeset for running domain requires st= rict or restrictive numa mode")); + _("change of nodeset for running domain requires re= strictive numa mode")); return -1; } =20 @@ -8913,17 +8912,31 @@ qemuDomainSetNumaParameters(virDomainPtr dom, goto endjob; } =20 - if (nodeset && - qemuDomainSetNumaParamsLive(vm, nodeset) < 0) - goto endjob; + if (mode =3D=3D VIR_DOMAIN_NUMATUNE_MEM_STRICT) { + virBitmap *config_nodeset =3D NULL; =20 - if (virDomainNumatuneSet(def->numa, - def->placement_mode =3D=3D - VIR_DOMAIN_CPU_PLACEMENT_MODE_STATIC, - -1, mode, nodeset) < 0) - goto endjob; + if (virDomainNumatuneMaybeGetNodeset(def->numa, priv->autoNode= set, + &config_nodeset, -1) < 0) + goto endjob; =20 - qemuDomainSaveStatus(vm); + if (!virBitmapEqual(nodeset, config_nodeset)) { + virReportError(VIR_ERR_OPERATION_INVALID, "%s", + _("can't change nodeset for strict mode for= running domain")); + goto endjob; + } + } else { + if (nodeset && + qemuDomainSetNumaParamsLive(vm, nodeset) < 0) + goto endjob; + + if (virDomainNumatuneSet(def->numa, + def->placement_mode =3D=3D + VIR_DOMAIN_CPU_PLACEMENT_MODE_STATIC, + -1, mode, nodeset) < 0) + goto endjob; + + qemuDomainSaveStatus(vm); + } } =20 if (persistentDef) { --=20 2.32.0 From nobody Sun May 5 11:29:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639670522; cv=none; d=zohomail.com; s=zohoarc; b=Lp6duOJ1ksjQcPUuZNoicY/g5f8+ENovT1ycB0oqdgL7RlTZkfYTJjdXPH2wfAGyMOo4Jd21w6isfbvEA0zj53dqS39V4teQPvQj+zoovxUyALk5oAjZAd+1LD892K54uDtvrjDm0ZwzD9cPgP8+FG+DAufbGTHEGCksAKO8Uyo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639670522; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dM0Ik4Ih/nwriOXOSNZDLnl90nVh/l/JIDZZ+vjjOCY=; b=Hww9NDkQKMFrmgaNceheuu0gc0HQiEgNCmOVEXebl6m8aNfiSH+OJ7exRwLxY44+ryBBw4yhnqf29NzeiTE8jTuTi9AZuCYexu2R4vLGOEUfH1SR/QbbO8oYm3K1sJ+jD1p3+9o7nFaeKzxSPEYS7BRBy3TcQHv+OidrNgnQSGc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1639670522529707.716503037232; Thu, 16 Dec 2021 08:02:02 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-121-YOWoHIVyNOSBjYcYqd-FUA-1; Thu, 16 Dec 2021 11:01:45 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CC7AF2F45; Thu, 16 Dec 2021 16:01:35 +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 A923F4E2BD; Thu, 16 Dec 2021 16:01:35 +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 75F5D1806D1C; Thu, 16 Dec 2021 16:01:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BGG1C4S005518 for ; Thu, 16 Dec 2021 11:01:12 -0500 Received: by smtp.corp.redhat.com (Postfix) id 288031037F39; Thu, 16 Dec 2021 16:01:12 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id A4D41101E5BF for ; Thu, 16 Dec 2021 16:01:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639670517; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=dM0Ik4Ih/nwriOXOSNZDLnl90nVh/l/JIDZZ+vjjOCY=; b=hWfRIOC/UnZ11FVCG18wxX3UFMByxPQSN/W1EvwzgJlfLsG9qIPTUERpKPW7g/J4RWp0mj u3BR3vb0DLOO3PGPm8eLLKuzZ6YoMYCiAY/NOvjQ3LtrBDTUN6qgeVYUYOLJ4zPhQbJYih 4UH0t9JVq02dPAyQS1o96LSTQpxO8oo= X-MC-Unique: YOWoHIVyNOSBjYcYqd-FUA-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 5/6] qemu_command: do use host-nodes for system memory Date: Thu, 16 Dec 2021 17:01:05 +0100 Message-Id: <3ed36cf2586ecc5d9de2262a0319efd7f00d2624.1639670293.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639670543012100001 Content-Type: text/plain; charset="utf-8" After previous commit, it's no longer possible to change nodeset for strict numatune. Therefore, we can start generating host-nodes onto command line again. This partially reverts d73265af6ec41104c20633b5c0a23688a62105e6. Signed-off-by: Michal Privoznik Reviewed-by: Pavel Hrdina --- src/qemu/qemu_command.c | 3 +-- .../qemuxml2argvdata/numatune-system-memory.x86_64-latest.args | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 6d00105b24..b554f4f025 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3906,8 +3906,7 @@ qemuBuildMemoryBackendProps(virJSONValue **backendPro= ps, /* If mode is "restrictive", we should only use cgroups setting allowe= d memory * nodes, and skip passing the host-nodes and policy parameters to QEM= U command * line which means we will use system default memory policy. */ - if (!systemMemory && nodemask && - mode !=3D VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) { + if (nodemask && mode !=3D VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) { if (!virNumaNodesetIsAvailable(nodemask)) return -1; if (virJSONValueObjectAdd(&props, diff --git a/tests/qemuxml2argvdata/numatune-system-memory.x86_64-latest.ar= gs b/tests/qemuxml2argvdata/numatune-system-memory.x86_64-latest.args index 2c1180b77e..fd93abe3eb 100644 --- a/tests/qemuxml2argvdata/numatune-system-memory.x86_64-latest.args +++ b/tests/qemuxml2argvdata/numatune-system-memory.x86_64-latest.args @@ -14,7 +14,7 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -accel tcg \ -cpu qemu64 \ -m 214 \ --object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264,"= host-nodes":[0],"policy":"bind"}' \ -overcommit mem-lock=3Doff \ -smp 2,sockets=3D2,cores=3D1,threads=3D1 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --=20 2.32.0 From nobody Sun May 5 11:29:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1639670510; cv=none; d=zohomail.com; s=zohoarc; b=hGD7R2CQAhlRO/X79+yeCZbwZzTaC7zrBtFfALCN1FyJvIm1Lz2hyAzAZ2Qw3I53YOwwQr+dS8UcQ+4fzKTisX3p6C98p7IHUTKq9Xx+/OSOpIKCWb2doRCsveC+Rark02fb4sy+Ugp/s0G9tpGwpgCJSdzx5pGH+2KB3O6r6ek= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639670510; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=VqD8bM8+CSrGfyone9jLI6oO016G2T8iDO4aYz7lMr4=; b=VBe0F0XXsA8p8k3Hxh0L9lC8x/cqN+kQhGasXlwEDL8ZFOhVFMKqygUGFzQObHfC3ai9JgB0QX6vByozbSkJ33PGe3WJogjiZo1haD1GGzKa1xbNJV+mNk9IX5V9K5Ga48Q2I6VPRoBXJjLTAj5uaqSlmucVEhdJGyICDKSlVyo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1639670510357621.2085081032579; Thu, 16 Dec 2021 08:01:50 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-509-xVuxk0UgPgCrMxWFMa1Mzw-1; Thu, 16 Dec 2021 11:01:46 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 655B9835E37; Thu, 16 Dec 2021 16:01:37 +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 41DC51037F39; Thu, 16 Dec 2021 16:01:37 +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 1246D1806D2C; Thu, 16 Dec 2021 16:01:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BGG1CXU005523 for ; Thu, 16 Dec 2021 11:01:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id EE5951037F3D; Thu, 16 Dec 2021 16:01:12 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 764F21037F39 for ; Thu, 16 Dec 2021 16:01:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639670509; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=VqD8bM8+CSrGfyone9jLI6oO016G2T8iDO4aYz7lMr4=; b=GY2sJu4GWq0t1fVohsDESVXahAyNwhs8xjKc3+RjPNYx8ynHUSnx3GpSqfkRtY48XcnZq3 IvLV4sNw/Tnx/OL3Y7ql5un84A9CsiyiPIeLj79mKmrBrK5DNhRrALqKvTcuToK/zT3E9E +3GGTKqRf/rTn9uqrUw1TO7+paMuwww= X-MC-Unique: xVuxk0UgPgCrMxWFMa1Mzw-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 6/6] NEWS: Document recent numatune change Date: Thu, 16 Dec 2021 17:01:06 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639670534868100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Michal Privoznik Reviewed-by: Pavel Hrdina --- NEWS.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 4d1a1501ef..e7d5316721 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -15,6 +15,14 @@ v8.0.0 (unreleased) =20 * **Removed features** =20 + * qemu: Explicitly forbid live changing nodeset for strict numatune + + For ``strict`` mode of it can't be guaranteed that memory = is + moved completely onto new set of nodes (e.g. QEMU might have locked pi= eces + of its memory) thus breaking the strict promise. If live migration of = QEMU + memory between NUMA nodes is desired, users are advised to use + ``restrictive`` mode instead. + * **New features** =20 * qemu: Synchronous write mode for disk copy operations --=20 2.32.0