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 B7776424EE; Mon, 4 Sep 2023 11:10:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 52AD3402AF; Mon, 4 Sep 2023 11:10:55 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id A5B53400EF for ; Mon, 4 Sep 2023 11:10:53 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 6979C2089E; Mon, 4 Sep 2023 11:10:53 +0200 (CEST) Received: from dkrd2.smartsharesys.local ([192.168.4.12]) by smartserver.smartsharesystems.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 4 Sep 2023 11:10:52 +0200 From: =?UTF-8?q?Morten=20Br=C3=B8rup?= To: thomas@monjalon.net, david.marchand@redhat.com, olivier.matz@6wind.com, andrew.rybchenko@oktetlabs.ru, bruce.richardson@intel.com, mattias.ronnblom@ericsson.com Cc: honnappa.nagarahalli@arm.com, konstantin.v.ananyev@yandex.ru, dev@dpdk.org, =?UTF-8?q?Morten=20Br=C3=B8rup?= Subject: [PATCH] mempool: add cache guard to per-lcore debug statistics Date: Mon, 4 Sep 2023 11:10:20 +0200 Message-Id: <20230904091020.12481-1-mb@smartsharesystems.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 04 Sep 2023 09:10:52.0256 (UTC) FILETIME=[B40F8600:01D9DF0F] 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 The per-lcore debug statistics, if enabled, are frequently written by their individual lcores, so add a cache guard to prevent CPU cache thrashing. Depends-on: series-29415 ("clarify purpose of empty cache lines") Signed-off-by: Morten Brørup --- lib/mempool/rte_mempool.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h index a05b25d5b9..f70bf36080 100644 --- a/lib/mempool/rte_mempool.h +++ b/lib/mempool/rte_mempool.h @@ -78,6 +78,7 @@ struct rte_mempool_debug_stats { uint64_t get_fail_objs; /**< Objects that failed to be allocated. */ uint64_t get_success_blks; /**< Successful allocation number of contiguous blocks. */ uint64_t get_fail_blks; /**< Failed allocation number of contiguous blocks. */ + RTE_CACHE_GUARD; } __rte_cache_aligned; #endif -- 2.17.1