From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Qemu-devel] [PATCH] posix-aio-compat: fix latency issues Date: Mon, 08 Aug 2011 16:26:25 +0300 Message-ID: <4E3FE401.6080701@redhat.com> References: <1312803458-2272-1-git-send-email-avi@redhat.com> <4E3FDC93.3000701@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org To: Frediano Ziglio Return-path: Received: from mx1.redhat.com ([209.132.183.28]:9916 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751662Ab1HHN0b (ORCPT ); Mon, 8 Aug 2011 09:26:31 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 08/08/2011 04:21 PM, Frediano Ziglio wrote: > > > > The entire qemu process may be affined to a subset of the host cpus; we > > don't want to break that. > > > > For example: > > > > taskset 0xf0 qemu .... > > (qemu) info cpus > > > > > > > > Just call sched_getaffinity at program start, save to a global > variable and then set this affinity for io threads. This affinity may change later on. > I didn't use affinity that much but from manual it seems that if you > own process you can set affinity as you like. > IMHO this patch introduce a delay in io thread creation due to posting > thread creation to another thread just to set different affinity. It does. But aio threads have a long life, so this happens very rarely. -- error compiling committee.c: too many arguments to function