Received: from eggs.gnu.org ([2001:4830:134:3::10]:50440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBOxY-0001E2-4u for qemu-devel@nongnu.org; Wed, 14 Jan 2015 09:30:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBOxU-0006Db-Uv for qemu-devel@nongnu.org; Wed, 14 Jan 2015 09:30:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBOxU-0006D8-OA for qemu-devel@nongnu.org; Wed, 14 Jan 2015 09:30:08 -0500 From: Markus Armbruster References: <1421197016-69426-1-git-send-email-agraf@suse.de> <54B61CD6.7010303@redhat.com> <20150114102026.GE5136@noname.redhat.com> <54B65085.70007@redhat.com> Date: Wed, 14 Jan 2015 15:24:59 +0100 In-Reply-To: <54B65085.70007@redhat.com> (Paolo Bonzini's message of "Wed, 14 Jan 2015 12:18:29 +0100") Message-ID: <87387de8xw.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain 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: Paolo Bonzini Cc: Kevin Wolf , Alexander Graf , Stefan Hajnoczi , qemu-devel@nongnu.org Paolo Bonzini writes: > On 14/01/2015 11:20, Kevin Wolf wrote: >>> > 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. >> Shouldn't we rather try and decrease the stack sizes a bit? 1 MB per >> coroutine is really a lot, and as I understand it, threads take even >> more by default. > > Yup, 2 MB. Last time I proposed this, I think Markus was strongly in > the "better safe than sorry" camp. :) Yup. Running out of stack is a nasty failure mode. > But thread pool workers definitely don't need a big stack. When analysis leads to an upper bound for stack size, by all means use it. Absent rigorous analysis backed by testing, I recommend to throw address space at the problem. 32 bit limitations can force us to throw less generously (and be less safe) there. Not a good reason to compromise safety on 64 bit machines as well, though. [...]