From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5MP1-00070B-Dj for qemu-devel@nongnu.org; Tue, 24 May 2016 20:10:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5MOv-00019q-9d for qemu-devel@nongnu.org; Tue, 24 May 2016 20:10:22 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:42874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5MOs-00011k-On for qemu-devel@nongnu.org; Tue, 24 May 2016 20:10:17 -0400 Date: Tue, 24 May 2016 20:10:04 -0400 From: "Emilio G. Cota" Message-ID: <20160525001004.GA3650@flamenco> References: <1463196873-17737-1-git-send-email-cota@braap.org> <1463196873-17737-14-git-send-email-cota@braap.org> <574367EB.8030101@gmail.com> <20160524220755.GA25193@flamenco> <5744D2F1.2050009@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5744D2F1.2050009@gmail.com> Subject: Re: [Qemu-devel] [PATCH v5 13/18] qht: support parallel writes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Fedorov Cc: QEMU Developers , MTTCG Devel , Alex =?iso-8859-1?Q?Benn=E9e?= , Paolo Bonzini , Peter Crosthwaite , Richard Henderson On Wed, May 25, 2016 at 01:17:21 +0300, Sergey Fedorov wrote: > >> With this implementation we could: > >> (1) get rid of qht_map::stale > >> (2) don't waste cycles waiting for resize to complete > > I'll include this in v6. > > How is it by perf? Not much of a difference, since resize is a slow path. Calling qht-bench with lots of update and resize threads performs very poorly either way =D I like the change though because using the mutex here simplifies the resize code; there's no guilt anymore attached to holding the lock for some time (e.g. when allocating a new, possible quite large, map), whereas with the spinlock we would allocate it before acquiring the lock, without knowing whether the allocation would be needed in the end. Emilio