From patchwork Mon Dec 4 20:16:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bodireddy, Bhanuprakash" X-Patchwork-Id: 844404 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yrGjL6vnSz9ryr for ; Tue, 5 Dec 2017 07:30:46 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id AB9ABD3C; Mon, 4 Dec 2017 20:29:09 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 662F0D37 for ; Mon, 4 Dec 2017 20:29:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 19BD3189 for ; Mon, 4 Dec 2017 20:29:08 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2017 12:29:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,361,1508828400"; d="scan'208";a="12991749" Received: from silpixa00393942.ir.intel.com (HELO silpixa00393942.ger.corp.intel.com) ([10.237.223.42]) by orsmga001.jf.intel.com with ESMTP; 04 Dec 2017 12:29:06 -0800 From: Bhanuprakash Bodireddy To: dev@openvswitch.org Date: Mon, 4 Dec 2017 20:16:50 +0000 Message-Id: <1512418610-84032-5-git-send-email-bhanuprakash.bodireddy@intel.com> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1512418610-84032-1-git-send-email-bhanuprakash.bodireddy@intel.com> References: <1512418610-84032-1-git-send-email-bhanuprakash.bodireddy@intel.com> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH RFC 5/5] dpif-netdev: Prefetch the cacheline having the cycle stats. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Prefetch the cacheline having the cycle stats so that we can speed up the cycles_count_start() and cycles_count_intermediate(). Signed-off-by: Bhanuprakash Bodireddy --- lib/dpif-netdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index b74b5d7..ab13d83 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -576,7 +576,7 @@ struct dp_netdev_pmd_thread { struct ovs_mutex flow_mutex; /* 8 pad bytes. */ ); - PADDED_MEMBERS(CACHE_LINE_SIZE, + PADDED_MEMBERS_CACHELINE_MARKER(CACHE_LINE_SIZE, cachelineC, struct cmap flow_table OVS_GUARDED; /* Flow table. */ /* One classifier per in_port polled by the pmd */ @@ -4082,6 +4082,7 @@ reload: lc = UINT_MAX; } + OVS_PREFETCH_CACHE(&pmd->cachelineC, OPCH_HTW); cycles_count_start(pmd); for (;;) { for (i = 0; i < poll_cnt; i++) {