From patchwork Mon Jun 5 22:49:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emilio Cota X-Patchwork-Id: 9767639 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9078F602B6 for ; Mon, 5 Jun 2017 22:50:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 838362841E for ; Mon, 5 Jun 2017 22:50:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 780A32843F; Mon, 5 Jun 2017 22:50:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E0CDF2841E for ; Mon, 5 Jun 2017 22:50:57 +0000 (UTC) Received: from localhost ([::1]:35441 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dI0ps-0007nt-EQ for patchwork-qemu-devel@patchwork.kernel.org; Mon, 05 Jun 2017 18:50:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dI0ou-0007nF-G7 for qemu-devel@nongnu.org; Mon, 05 Jun 2017 18:49:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dI0or-0000GO-DL for qemu-devel@nongnu.org; Mon, 05 Jun 2017 18:49:56 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:56041) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dI0or-0000FC-9F for qemu-devel@nongnu.org; Mon, 05 Jun 2017 18:49:53 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id A939520B65; Mon, 5 Jun 2017 18:49:49 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Mon, 05 Jun 2017 18:49:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Nw6 5aPg8R+0vhnyHLzkpEZ60djDDRv4ewBgMRIHCUtY=; b=XqTht5YFCOtDelruaAW q2xkVKX9eJeJhDqaeCH4W54dsETMVt+za+UeZ9iRpE83w/zatL3SRm0paaWjApd9 B7G4ybp/VcuSVr7hz+HrzvcgxcdUDfLTAJT3yf4tDpOJGNvwbSq8hWkjCWKrYS8L hf5oVGd5H0RIhkXheCCs85Lc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=Nw65aPg8R+0vhnyHLzkpEZ60djDDRv4ewBgMRIHCU tY=; b=HaQ0SijEVyI9DdGuE1gJJaeF8UHLmpezpdfga8w9H4bSu+SfLDapGcngr s5l4+5VwX6e1GvwyhCysodVh6No3mO4XBQXDv8gPOuvXlG8NPQEJ0xOEiJwKHo/u DuMF6Yma/6FDvC4LzV/YD2NB2+FXK8T2F6Qi0MBE50fN7vevPcyqn5hVDYiz4miB QL5mHoKgGt8r20DW7LmT01JLMuJf4FmUM5PAhLh5Q6LN7QRhBfFc0fVcQxbMi6SX CLgnPwVHD4HbLAgq/MFVet/hqqLEHXPYUdAVKealylktgTCUGPKgPX9j0Qq9hgfw meh+ptGaxlQIL5ZF3mm2QDQifsC9g== X-ME-Sender: X-Sasl-enc: Pk4mBwn9oGgeE6NB+6Yr2UXfOjUWpvSD7Ptyy2h+Cc0y 1496702989 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 6B13B24870; Mon, 5 Jun 2017 18:49:49 -0400 (EDT) From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Mon, 5 Jun 2017 18:49:38 -0400 Message-Id: <1496702979-26132-3-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1496702979-26132-1-git-send-email-cota@braap.org> References: <1496702979-26132-1-git-send-email-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.25 Subject: [Qemu-devel] [PATCH v2 2/3] tests: use QEMU_CACHELINE_SIZE instead of hard-coding it X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Pranith Kumar , Paolo Bonzini , alex.bennee@linaro.org, Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Emilio G. Cota Reviewed-by: Pranith Kumar --- tests/atomic_add-bench.c | 4 ++-- tests/qht-bench.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/atomic_add-bench.c b/tests/atomic_add-bench.c index caa1e8e..c219109 100644 --- a/tests/atomic_add-bench.c +++ b/tests/atomic_add-bench.c @@ -5,11 +5,11 @@ struct thread_info { uint64_t r; -} QEMU_ALIGNED(64); +} QEMU_ALIGNED(QEMU_CACHELINE_SIZE); struct count { unsigned long val; -} QEMU_ALIGNED(64); +} QEMU_ALIGNED(QEMU_CACHELINE_SIZE); static QemuThread *threads; static struct thread_info *th_info; diff --git a/tests/qht-bench.c b/tests/qht-bench.c index 2afa09d..3f4b5eb 100644 --- a/tests/qht-bench.c +++ b/tests/qht-bench.c @@ -28,7 +28,7 @@ struct thread_info { uint64_t r; bool write_op; /* writes alternate between insertions and removals */ bool resize_down; -} QEMU_ALIGNED(64); /* avoid false sharing among threads */ +} QEMU_ALIGNED(QEMU_CACHELINE_SIZE); /* avoid false sharing among threads */ static struct qht ht; static QemuThread *rw_threads;