Received: from eggs.gnu.org ([2001:4830:134:3::10]:48469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoEx9-0001JK-1k for qemu-devel@nongnu.org; Thu, 07 Apr 2016 14:46:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoEuD-00086u-HF for qemu-devel@nongnu.org; Thu, 07 Apr 2016 14:43:51 -0400 Received: from lists.gnu.org ([2001:4830:134:3::11]:57812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoEuD-00086o-Ea for qemu-devel@nongnu.org; Thu, 07 Apr 2016 14:43:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoEAO-0002g4-Pm for qemu-devel@nongnu.org; Thu, 07 Apr 2016 13:56:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoDnR-0003W5-BV for qemu-devel@nongnu.org; Thu, 07 Apr 2016 13:32:48 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:56117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoDnR-0003Vs-7l for qemu-devel@nongnu.org; Thu, 07 Apr 2016 13:32:45 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6260120AB1 for ; Thu, 7 Apr 2016 13:32:43 -0400 (EDT) From: "Emilio G. Cota" Date: Thu, 7 Apr 2016 13:32:25 -0400 Message-Id: <1460050358-25025-1-git-send-email-cota@braap.org> Subject: [Qemu-devel] [PATCH v2 00/10] tb hash improvements List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers , MTTCG Devel Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Paolo Bonzini , Peter Crosthwaite , Richard Henderson , Peter Maydell , Sergey Fedorov See v1 for context: https://lists.gnu.org/archive/html/qemu-devel/2016-04/msg00587.html All patches in v2 are checkpatch-clean, except 05 (checkpatch should be ignored for this one) and 06, which I took unmodified (later patches fix those warnings while doing other things, anyway). Note that patch 01 has already been picked up by Paolo; I left it here for completeness. Another patch that is related to this series is the transition of tb->flags to uint32_t; this has been sent as a separate patch since it touches all targets. It shouldn't conflict with this patchset. Changes from v1: - Drop QEMU_CACHELINE, define QEMU_ALIGNED() + Remove excessive caution about Windows: it supports it. + define QHT_BUCKET_ALIGN as 64 - Add some reviewed-by tags from Alex. - Drop POSIX spinlock wrapper; use the one pointed out by Paolo + Add a couple of fixes over this spinlock implementation: * define cpu_relax() for some architectures * Optimize spin_lock() for uncontended cases - Add tb_hash_func5, a version of xxhash32 customized for tb-hash, so that the input values do not have to be contiguous in memory. + Drop xxhash.h, add only the customized version at exec/tb-hash-xx.h - qht + use size_t for counts in qht * Drop some 2**32 size checks in there; it's not really a problem in practice. + s/__func/func__locked/ + Test program: hash with tb_hash_func5 Thanks, Emilio