From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBIWl-0002pU-F8 for qemu-devel@nongnu.org; Wed, 14 Jan 2015 02:38:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBIWh-0000ZT-FW for qemu-devel@nongnu.org; Wed, 14 Jan 2015 02:38:07 -0500 Received: from mail-wg0-x22a.google.com ([2a00:1450:400c:c00::22a]:46427) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBIWh-0000Yl-8m for qemu-devel@nongnu.org; Wed, 14 Jan 2015 02:38:03 -0500 Received: by mail-wg0-f42.google.com with SMTP id k14so7246929wgh.1 for ; Tue, 13 Jan 2015 23:38:02 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54B61CD6.7010303@redhat.com> Date: Wed, 14 Jan 2015 08:37:58 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1421197016-69426-1-git-send-email-agraf@suse.de> In-Reply-To: <1421197016-69426-1-git-send-email-agraf@suse.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] AIO: Reduce number of threads for 32bit hosts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , Kevin Wolf Cc: qemu-devel@nongnu.org, Stefan Hajnoczi On 14/01/2015 01:56, Alexander Graf wrote: > + if (sizeof(pool) == 4) { > + /* 32bit systems run out of virtual memory quickly */ > + pool->max_threads = 4; > + } else { > + pool->max_threads = 64; > + } Reviewed-by: Paolo Bonzini The same problem applies to coroutine stacks, and those cannot be throttled down as easily. But I guess if you limit the number of threads, the guest gets slowed down and doesn't create as many coroutines. It would be nice to have a way to measure coroutine stack usage, similar to what the kernel does. Paolo