From patchwork Fri Oct 7 16:17:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bodireddy, Bhanuprakash" X-Patchwork-Id: 679468 X-Patchwork-Delegate: diproiettod@vmware.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3srFCK5JRmz9s3v for ; Sat, 8 Oct 2016 03:21:49 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 43882109EA; Fri, 7 Oct 2016 09:21:11 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id B9D25109CB for ; Fri, 7 Oct 2016 09:21:08 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 4BE5542072A for ; Fri, 7 Oct 2016 10:21:08 -0600 (MDT) X-ASG-Debug-ID: 1475857267-09eadd48a00e6f0001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar5.cudamail.com with ESMTP id eusQoFrH1s4BGEeH (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 07 Oct 2016 10:21:07 -0600 (MDT) X-Barracuda-Envelope-From: bhanuprakash.bodireddy@intel.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO mga05.intel.com) (192.55.52.43) by mx3-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 7 Oct 2016 16:21:07 -0000 Received-SPF: pass (mx3-pf1.cudamail.com: SPF record at intel.com designates 192.55.52.43 as permitted sender) X-Barracuda-Apparent-Source-IP: 192.55.52.43 X-Barracuda-RBL-IP: 192.55.52.43 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP; 07 Oct 2016 09:21:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,456,1473145200"; d="scan'208";a="177488335" Received: from silpixa00393942.ir.intel.com ([10.237.223.42]) by fmsmga004.fm.intel.com with ESMTP; 07 Oct 2016 09:21:07 -0700 X-CudaMail-Envelope-Sender: bhanuprakash.bodireddy@intel.com From: Bhanuprakash Bodireddy To: dev@openvswitch.org X-CudaMail-MID: CM-V1-1006023420 X-CudaMail-DTE: 100716 X-CudaMail-Originating-IP: 192.55.52.43 Date: Fri, 7 Oct 2016 17:17:36 +0100 X-ASG-Orig-Subj: [##CM-V1-1006023420##][PATCH 06/12] cmap: Remove prefetching in cmap_find_batch(). Message-Id: <1475857062-55311-7-git-send-email-bhanuprakash.bodireddy@intel.com> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1475857062-55311-1-git-send-email-bhanuprakash.bodireddy@intel.com> References: <1475857062-55311-1-git-send-email-bhanuprakash.bodireddy@intel.com> X-GBUdb-Analysis: 0, 192.55.52.43, Ugly c=0.279065 p=-0.0666667 Source Normal X-MessageSniffer-Rules: 0-0-0-4494-c X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1475857267 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 1.10 X-Barracuda-Spam-Status: No, SCORE=1.10 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_RULE_7582B, BSF_SC5_MJ1963, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.33545 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE_7582B Custom Rule 7582B 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Subject: [ovs-dev] [PATCH 06/12] cmap: Remove prefetching in cmap_find_batch(). X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" prefetching the data in to the caches isn't improving the performance in cmap_find_batch(). Moreover its found that there is slight improvement in performance with out prefetching. This patch removes prefetching from cmap_find_batch(). Signed-off-by: Bhanuprakash Bodireddy Signed-off-by: Antonio Fischetti --- lib/cmap.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/cmap.c b/lib/cmap.c index 8c7312d..4c34bda 100644 --- a/lib/cmap.c +++ b/lib/cmap.c @@ -397,7 +397,6 @@ cmap_find_batch(const struct cmap *cmap, unsigned long map, ULLONG_FOR_EACH_1(i, map) { h1s[i] = rehash(impl, hashes[i]); b1s[i] = &impl->buckets[h1s[i] & impl->mask]; - OVS_PREFETCH(b1s[i]); } /* Lookups, Round 1. Only look up at the first bucket. */ ULLONG_FOR_EACH_1(i, map) { @@ -413,13 +412,11 @@ cmap_find_batch(const struct cmap *cmap, unsigned long map, if (!node) { /* Not found (yet); Prefetch the 2nd bucket. */ b2s[i] = &impl->buckets[other_hash(h1s[i]) & impl->mask]; - OVS_PREFETCH(b2s[i]); c1s[i] = c1; /* We may need to check this after Round 2. */ continue; } /* Found. */ ULLONG_SET0(map, i); /* Ignore this on round 2. */ - OVS_PREFETCH(node); nodes[i] = node; } /* Round 2. Look into the 2nd bucket, if needed. */ @@ -453,7 +450,6 @@ cmap_find_batch(const struct cmap *cmap, unsigned long map, continue; } found: - OVS_PREFETCH(node); nodes[i] = node; } return result;