From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH 3/6] kvm tools: Introduce generic IO threadpool Date: Fri, 29 Apr 2011 14:12:39 +0300 Message-ID: <1304075559.10069.21.camel@lappy> References: <1303998045-22932-1-git-send-email-levinsasha928@gmail.com> <1303998045-22932-3-git-send-email-levinsasha928@gmail.com> <4DBA63D7.6090801@gmail.com> <4DBA653A.90700@cs.helsinki.fi> <1304064977.10069.15.camel@lappy> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Asias He , mingo@elte.hu, gorcunov@gmail.com, prasadjoshi124@gmail.com, kvm To: Pekka Enberg Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:53772 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755566Ab1D2LMv (ORCPT ); Fri, 29 Apr 2011 07:12:51 -0400 Received: by wwa36 with SMTP id 36so4157413wwa.1 for ; Fri, 29 Apr 2011 04:12:50 -0700 (PDT) In-Reply-To: <1304064977.10069.15.camel@lappy> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 2011-04-29 at 15:08 +0800, Asias He wrote: On 04/28/2011 09:40 PM, Sasha Levin wrote: > > + nr_online_cpus = sysconf(_SC_NPROCESSORS_ONLN); > > + thread_pool__init(nr_online_cpus); > > We may benefit from more threads than the number of hardware thread we > have. Currently, virtio_console consumes two, virio_net consumes two, > and virtio_blk consumes one. Can we adjust the thread pool size when > devices register to use thread pool? How many threads do we want to have the threadpool use? Currently theres a thread allocated for each VCPU + _SC_NPROCESSORS_ONLN I/O threads. Should we just allocate another thread for each device that registers within the threadpool? This number can grow to be pretty big once we start adding multiple devices. -- Sasha.