From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 29D13459C5; Wed, 18 Sep 2024 08:05:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E90F040EF0; Wed, 18 Sep 2024 08:05:20 +0200 (CEST) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by mails.dpdk.org (Postfix) with ESMTP id 956004027C for ; Wed, 18 Sep 2024 08:05:19 +0200 (CEST) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 1FA5D1D503 for ; Wed, 18 Sep 2024 08:05:19 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 12C421D501; Wed, 18 Sep 2024 08:05:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on hermod.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,AWL, T_SCC_BODY_TEXT_LINE autolearn=disabled version=4.0.0 X-Spam-Score: -1.2 Received: from [192.168.1.86] (h-62-63-215-114.A163.priv.bahnhof.se [62.63.215.114]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 75A761D3FD; Wed, 18 Sep 2024 08:05:17 +0200 (CEST) Message-ID: <7b9c52c8-dd71-4f3b-9f40-c57fbdd070c4@lysator.liu.se> Date: Wed, 18 Sep 2024 08:05:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 3/7] eal: add lcore variable performance test To: =?UTF-8?Q?Morten_Br=C3=B8rup?= , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , dev@dpdk.org Cc: Stephen Hemminger , Konstantin Ananyev , David Marchand , Jerin Jacob References: <20240916105210.721315-2-mattias.ronnblom@ericsson.com> <20240917143239.724069-1-mattias.ronnblom@ericsson.com> <20240917143239.724069-4-mattias.ronnblom@ericsson.com> <98CBD80474FA8B44BF855DF32C47DC35E9F6F5@smartserver.smartshare.dk> Content-Language: en-US From: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F6F5@smartserver.smartshare.dk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2024-09-17 17:40, Morten Brørup wrote: >> + start = rte_rdtsc(); >> + >> + for (i = 0; i < ITERATIONS; i++) >> + update_fun(mods[i & num_mods_mask]); > > This indexing adds more instructions to be executed than just the update function. > The added overhead is the same for all tested access methods, so the absolute difference in latency (i.e. measured in cycles) is still perfectly valid. > Just mentioning it; no change required. > >> + >> + end = rte_rdtsc(); >> + >> + latency = (end - start) / ITERATIONS; > > This calculation is integer; add (double) somewhere to make it floating point. > Indeed, it is. Will fix. >> + >> + return latency; >> +} >