Received: from eggs.gnu.org ([2001:4830:134:3::10]:45562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2JW2-0007Hd-LS for qemu-devel@nongnu.org; Thu, 03 Nov 2016 11:01:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2JVy-0008FD-1f for qemu-devel@nongnu.org; Thu, 03 Nov 2016 11:01:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57320) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2JVx-0008ET-Sn for qemu-devel@nongnu.org; Thu, 03 Nov 2016 11:01:13 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5C1DA61BB8 for ; Thu, 3 Nov 2016 15:01:11 +0000 (UTC) References: <1475580151-3856-1-git-send-email-maxime.coquelin@redhat.com> From: Maxime Coquelin Message-ID: <2f10cdd9-0424-d61e-a36b-5c4895ecffbb@redhat.com> Date: Thu, 3 Nov 2016 16:01:08 +0100 MIME-Version: 1.0 In-Reply-To: <1475580151-3856-1-git-send-email-maxime.coquelin@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] scripts: qmp: Introduce vcpu pinning helper script List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: armbru@redhat.com, qemu-devel@nongnu.org, peterx@redhat.com Cc: lcapitulino@redhat.com Hi Peter, On 10/04/2016 01:22 PM, Maxime Coquelin wrote: > This python script calls 'query-cpus' QMP command to retrieve > vCPUs thread IDs. > Thread IDs are then used by taskset to pin vCPUs to physical > CPUs passed in command line. > > In case more vCPUs are present than the number of CPUs assigned > in command line, multiple vCPUs get pinned to physical CPUs. > > If multiple vCPUs share a same thread ID (e.g. with TCG), the > thread ID is pinned a single time. > > Signed-off-by: Maxime Coquelin > --- > Changes since RFC: > ================== > - If vCPUs share a same TID, don't pin them multiple times (peterx) > > scripts/qmp/qmp-vcpu-pin | 45 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 45 insertions(+) > create mode 100755 scripts/qmp/qmp-vcpu-pin I added your proposed change not to pin same TID multiple time, does it look good to you? Thanks, Maxime