From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZi6u-0002py-Me for qemu-devel@nongnu.org; Thu, 02 Oct 2014 11:16:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZi6l-0004CN-HV for qemu-devel@nongnu.org; Thu, 02 Oct 2014 11:16:04 -0400 Date: Thu, 2 Oct 2014 16:15:52 +0100 From: Stefan Hajnoczi Message-ID: <20141002151552.GG6250@stefanha-thinkpad.redhat.com> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KR/qxknboQ7+Tpez" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] Question on qemu threads List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Al Patel Cc: qemu-devel@nongnu.org, qemu-discuss@nongnu.org --KR/qxknboQ7+Tpez Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 30, 2014 at 01:44:48PM -0400, Al Patel wrote: > In the current system, what are the extra threads? The set of thread is dynamic because worker threads are started and terminated depending on guest activity. You cannot make assumptions about threads and QEMU provides monitor commands that expose the tids. > Secondly, I am currently not using libvirt and having to start qemu from > command line. I still want to pin the vcpu to a pcpu and want to use > taskset on a thread. Unless I know which thread is emulating the vcpu > how can I pin that thread? >=20 > Do you have any other thoughts on the pinning part? Use libvirt if you can. It will save you a ton of time. If you really cannot use it, you can still look at its source code to understand how it does what it does. See qemuProcessDetectVcpuPIDs() in libvirt and the QEMU query-cpus QMP command. Stefan --KR/qxknboQ7+Tpez Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJULWwoAAoJEJykq7OBq3PICF8H/Rer4V9yncIj/AunJ0P8AjgA Ec0LwXEipHogHB8cjMIPLam1xXebGP5gb+KG62lBmIZHg580klU6bf8gGKJcK7Wj scH7m3QFlQhCLP0WzukKBAJw8a8wj9KCqPvP0zuFSlp5w3AOxLPYhptx46q6tGRw A5jviMQGEBh2qWhXjWczri72j1ZAJXbwzxR7zwA59MdwNXTwIRYmut8M5fD69Czf aJgqnyiNvBD/fNUKY5LS/BhQBHNASX8o1ukxNQvX24M4cb1XWP+ZOFOne5yCPPK5 9ESD219sjHJoxwuAqFgfXTmTevLz5oM3YoBYVMFAF11+rSroGjkSN/VAeIAA718= =tuAe -----END PGP SIGNATURE----- --KR/qxknboQ7+Tpez--