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 F20924310D; Sat, 26 Aug 2023 12:04:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 785E340E6E; Sat, 26 Aug 2023 12:04:25 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 875EE4068E for ; Sat, 26 Aug 2023 12:04:24 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id CF5F7206B5; Sat, 26 Aug 2023 12:04:21 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: mbuf fast free optimization idea X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Sat, 26 Aug 2023 12:04:18 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D87B46@smartserver.smartshare.dk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: mbuf fast free optimization idea Thread-Index: AdnYBBFAEmqxv6RTQj+BJjaJnYfKUw== From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: , , "Shahaf Shuler" Cc: 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 When RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE is used, the usage pattern of = some of the mbuf fields differs: - The "pool" pointer becomes rarely used. (Only one packet per burst.) - The "next" pointer becomes unused. - The "tx_offload" field is still used. (Set by application, read by = driver.) This means that the 2nd cache line in the mbuf now only contains one hot = field, "tx_offload". So, if we swap the "tx_offload" field (in the 2nd cache line) with the = "pool" field (in the 1st cache line), the 2nd cache line becomes rarely = used. This should provide a performance improvement for applications (using = RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) when under cache pressure. PS: Back in the days, the mbuf description said that the 1st cache line = was for RX purposes, and the 2nd cache line was for TX purposes. This is = not true anymore, so let's not limit out thinking by that (obsolete) = design. Med venlig hilsen / Kind regards, -Morten Br=F8rup