From nobody Tue Nov 26 12:50:56 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=1686149151; cv=none; d=zohomail.com; s=zohoarc; b=TgGiJpS0K7dSRI39O38BzTQ3D73R7nl6pNAZznH+lcf2o/tMBmKQl2PFLp6qS566/uqn05wgMa/r5cKQEs6BZGKTkTP+tZvl6+NN3UgQ6y5rrK+UIYcxN6BhZs41mStxCwFgxc1mjAC46xKhqWJcKJ9z5uym/+VLBka7b3e2+fE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686149151; 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=0y5MCpipuhSp4sx/K9k6EY/RMyoQtBQGCuMLRcDbPeU=; b=Eg4zs07VQ/7v2RDwD2Z4RrL92nSM3A6ek0ZPY50OATxOsyGmQeVjtLUqsJBDUIk52yDOxDfuFwzlQHGynICEBhdIQraz6uI1/0oJOXQ+aCuFTIl5CozgJFBnR3tDiL8DxmerUb5stRMis1O6y3zuEpPzmj+q31VKDvE1bM8ggdY= 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 1686149151093972.8854569946024; Wed, 7 Jun 2023 07:45:51 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-179-42vQHPsZPEWQkILkQgyC1g-1; Wed, 07 Jun 2023 10:45:48 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B69BE800969; Wed, 7 Jun 2023 14:45:45 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A20A8140E958; Wed, 7 Jun 2023 14:45:45 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4857D19452C3; Wed, 7 Jun 2023 14:45:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1806A19451D9 for ; Wed, 7 Jun 2023 14:41:04 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CCB68403362; Wed, 7 Jun 2023 14:41:04 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7494A477F61 for ; Wed, 7 Jun 2023 14:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686149150; 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=0y5MCpipuhSp4sx/K9k6EY/RMyoQtBQGCuMLRcDbPeU=; b=hvxKne5sGMcJupL0J6OCQn6YVvnxAL7rMeegk1iY4HpuJKhjd107AdRe7VYxzlxhkCRfVN X4trV9c0mvxswq/HSIQ3TYDvEabdc0ih+beloS1HpMcC7bvsAm9T32wzOPHCaCgFgYFHL5 qhNMK+WQZYVXeUbJRf2cxxplUE3K0Hc= X-MC-Unique: 42vQHPsZPEWQkILkQgyC1g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/3] qemu: Allow more generous cpuset.mems for vCPUs and IOThreads Date: Wed, 7 Jun 2023 16:41:00 +0200 Message-Id: <3b9e8894a11e10fb0925ece05063aed53c31c2ba.1686148404.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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: 1686149151601100003 Content-Type: text/plain; charset="utf-8"; x-default="true" The unit that cpuset CGroups controller works with is a thread/process, not individual memory allocations. Therefore, after we've set cpuset.mems for emulator (after previous commit it's set to union of all host NUMA nodes allowed for given domain), and as we try to set up cpuset.mems for vCPUs/IOThreads, memory is migrated to selected NUMA node(s). We are effectively saying: "this thread (vCPU thread) can have memory only from these NUMA node(s)". That's not really what we want though. The cpuset controller doesn't differentiate memory "belonging" to the emulator thread and vCPU thread or IOThread even. Therefore, set union of all allowed host NUMA nodes, just like we're doing for the emulator thread. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D2138150 Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- src/qemu/qemu_process.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1d3cdeff9a..d9269e37a1 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2598,7 +2598,6 @@ qemuProcessSetupPid(virDomainObj *vm, /* QEMU allocates its memory from the emulator thread. Thus it * needs to access union of all host nodes configured. */ if (unionMems && - nameval =3D=3D VIR_CGROUP_THREAD_EMULATOR && mem_mode !=3D VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) { qemuDomainNumatuneMaybeFormatNodesetUnion(vm, NULL, &mem_m= ask); } else { @@ -5911,7 +5910,7 @@ qemuProcessSetupVcpu(virDomainObj *vm, vm->def->cputune.period, vm->def->cputune.quota, &vcpu->sched, - false) < 0) + true) < 0) return -1; =20 if (schedCore && @@ -6067,7 +6066,7 @@ qemuProcessSetupIOThread(virDomainObj *vm, vm->def->cputune.iothread_period, vm->def->cputune.iothread_quota, &iothread->sched, - false); + true); } =20 =20 --=20 2.39.3