From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B5A09A0527; Mon, 9 Nov 2020 11:33:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AAF6C5937; Mon, 9 Nov 2020 11:33:51 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 57FE55928; Mon, 9 Nov 2020 11:33:48 +0100 (CET) IronPort-SDR: SN7NCOGCA7NZp94Wb/WlBY9MDagm7/fYOZq5drv5th2SWiLVMaQpmKnui9vbv+hcsSxrV9RLqm tD+YoE6UVpmg== X-IronPort-AV: E=McAfee;i="6000,8403,9799"; a="187728092" X-IronPort-AV: E=Sophos;i="5.77,463,1596524400"; d="scan'208";a="187728092" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2020 02:33:45 -0800 IronPort-SDR: XDti9Q4ihCHxOx2yFJS9PqZOJzz++psGIquwQS+f+Lox8nf1oT6lYuKFTsXD8BrctB0uGG1d1g 16/GJzu0UNQA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,463,1596524400"; d="scan'208";a="322395064" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga003.jf.intel.com with ESMTP; 09 Nov 2020 02:33:45 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 9 Nov 2020 02:33:44 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 9 Nov 2020 02:33:44 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.104) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Mon, 9 Nov 2020 02:33:44 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lJ/r03gIZUteifW8Ztg41l5IMiOG+2JZo3CKkKiCwypPKBzXKdg2OxCsm+oHs5ZmErnykiPUA0KBD6pX9bGHxpe0qbBFsRg1srGX62jqxJ7Y+DqKwxlZ4KVyyFxDlWJPq5z1w5pZ20Cu53trEkhmUouQRA1AeThtbpftB+76z81mOCJ4626Geb7Utj/gI341uk/zfJf09UgcTmp9mPGcrHMUMO4DdRfsasFC4IJ+62hbVxpEW1m7iAVj7FUzeyHcLgKAXqo+eI0eIbXD/EhF7OCqzbLt3M4jPIpLlD9NAddfGrf9IQmIpUO3JRloOb2I9Ndseq/urRXuktlkZKY6YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=46NupeT41A5JrGBXk+tvXkTIFnF4BHLYUaze/sLK/gA=; b=gCfGVsIIggjGFmodDMOmu9GyDwQaMR4FQFqeoQIuksWfD9f9uR+7++rbJZHjlcp0MF0g/kM9J3BXpdbwUln504jwL4G+Nspm5pSl4gaF8Ki5xa94kMXpm8KUIPkvrXjiAHAlgGqxYf+NSElEwmCwEQNJq10KqX7tCoRHyGcQFhrpE24rIzq/c/hu/+SvVfuZop+NHCnufYr2iAI3tZPPCWBbQS2CAW4sDmjocwKjYskAu6wTdTwMsQbt0JBBj2/HLaFSeKZWzCfRHiAJg8p3vLLlKF0TJhcfmqFyzOmU4xXxuKjPkkDks7YI1VttMQaUUMOMKumEbXRuuRZubxUqiw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=46NupeT41A5JrGBXk+tvXkTIFnF4BHLYUaze/sLK/gA=; b=g4ukIEvSyrziti2wK8JiwbjnZTyI3qje+bYMJVuSt9oEsqLQMmhgKcOEtJVhbhqzUnZP4paB/KDptgkn6Qz3n8qlv95YUwOwNDhxk6lsxT4J97UuK4wrM07+DVLSzvzVd+vu60MTSzUf4nHkYd7AaE7Uel5TToYqJQqzfBaA0Sg= Received: from DM6PR11MB3308.namprd11.prod.outlook.com (2603:10b6:5:d::22) by DM6PR11MB4657.namprd11.prod.outlook.com (2603:10b6:5:2a6::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.23; Mon, 9 Nov 2020 10:33:41 +0000 Received: from DM6PR11MB3308.namprd11.prod.outlook.com ([fe80::fd2d:9bbb:599e:72dd]) by DM6PR11MB3308.namprd11.prod.outlook.com ([fe80::fd2d:9bbb:599e:72dd%6]) with mapi id 15.20.3541.021; Mon, 9 Nov 2020 10:33:41 +0000 From: "Ananyev, Konstantin" To: "Richardson, Bruce" , =?iso-8859-1?Q?Morten_Br=F8rup?= CC: Thomas Monjalon , "dev@dpdk.org" , "david.marchand@redhat.com" , "Yigit, Ferruh" , "olivier.matz@6wind.com" , "andrew.rybchenko@oktetlabs.ru" , "viacheslavo@nvidia.com" , "ajit.khaparde@broadcom.com" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , Ray Kinsella , Neil Horman , Nithin Dabilpuram , "Kiran Kumar K" , "techboard@dpdk.org" Thread-Topic: [PATCH 1/1] mbuf: move pool pointer in first half Thread-Index: AQHWtSP/uGyncSiUVECsGul9I7S6/am9BUmAgAKRBACAAATGYA== Date: Mon, 9 Nov 2020 10:33:41 +0000 Message-ID: References: <20201107155306.463148-1-thomas@monjalon.net> <98CBD80474FA8B44BF855DF32C47DC35C61404@smartserver.smartshare.dk> <20201109100838.GC831@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20201109100838.GC831@bricha3-MOBL.ger.corp.intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [46.7.39.127] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c30d1a2f-daec-41be-e4b3-08d8849aed34 x-ms-traffictypediagnostic: DM6PR11MB4657: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9789WfA6YwDTTx9AZ6r/CdJ9HkPHkeDgJtAkkN9trB0CfPyp6KkDtH29tZ0Be/WJBI617iEVYCY8Qf9N4C4kF3wworITNBn3kqcpw9pYmPPTfWnGhNeCqfp7hjthMUNuo1kTAWSD8/WHWCDiF35t5SrBW6DVNbZOndQLEE6a8vNPXhoCaMG2zHLUexTitRdgbGyN/PFS+mO8c8cRpGi3lRrawNm2BBec7Xlj8pMNVAuIML5W8HAe1KGeCrH236YnqEmXvaHP2OT93GvBrFMGdBgmfgZ9XFKGqXwM17Bxcx2Om9FQKuufYrMieB/7fgls0rLPJ5LmZL0O9XQWFKvxxg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3308.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(376002)(136003)(396003)(39860400002)(346002)(33656002)(5660300002)(8676002)(316002)(7416002)(71200400001)(478600001)(52536014)(7696005)(64756008)(2906002)(54906003)(4326008)(76116006)(8936002)(66476007)(66556008)(110136005)(86362001)(6506007)(66946007)(186003)(26005)(66446008)(55016002)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: qCR4HemPsCruT96LqcxNuebockslG982RejlycUSr6vF3xErrDYCuOspJiQ0J4nTYwV8vdKOOllXOMoFqTzrd8XRnE77XBF8KeP2HaSzCfg3R4S672cORuM0aaYGeb1PA8L9UvBP6tKvB9qtrDi8uaDGUmM7lqsoGuK2+0Zl4zKJtBRqUYJDyarWvBCheVRE1FVEaEoBpw/8DtgeiS0J0Wd9FMWJv1uNrDGk9Gi/Gs3IGTfnp3Mi6y6fr/zOyDtkgGwEmzZ+3MsnCIMeu0WUmJx/0w0qtbddMporW1w78B10eKvC0Lfp/4cXaRD1YEPevrlH9HXmTFnzHlSSDXyqd7I5107hF6CS9Zm92G6PEyu2Y2gTAH3BOLTwA2Cqzwm1hsE5LO16xRqiPRsQLZsca2pWhQSkC3iLZIgY5LXL8NdVJL8HGNzvl8y8zoUE54Od6ow0CQsE8Lu9fNydSGTCx+hO0wQzXBzrwJdSXh8/jkogudSmFefDHPOpb/ExAcUwqDWgGAfgM+hRa5FfhQz2nnsywINNJQcQlYWX0pGvpOI0mr8pM+CKPNlvLDG5+Wi1N2Xa5fZG/86KJv6YuW6rfUgr6wD0LBg3Nv0vuMNXirwTyTqnpFADctofnnWEGMJHd0AhPSOq2SM10oBRv5luFQ== Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB3308.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c30d1a2f-daec-41be-e4b3-08d8849aed34 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Nov 2020 10:33:41.1902 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: SIN/e8N0cwtxwXi+3LPf7EB5ah3QYbRxgi3wrlsNmX9oHW0kuuMqjY6neCrsr6Z4qxuIabXJoUQ8l7hvEdRxkbOuJtLKwCkTplw3ExR/S9s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4657 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 1/1] mbuf: move pool pointer in first half X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > On Sat, Nov 07, 2020 at 07:57:05PM +0100, Morten Br=F8rup wrote: > > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > Sent: Saturday, November 7, 2020 4:53 PM > > > > > > The mempool pointer in the mbuf struct is moved > > > from the second to the first half. > > > It should increase performance on most systems having 64-byte cache l= ine, > > > i.e. mbuf is split in two cache lines. > > > > Perhaps with the #define DEV_TX_OFFLOAD_MBUF_FAST_FREE mentioned by Kon= stantin, it might be better moving m->next instead, at > least for applications with the opportunity to set this flag (e.g. applic= ations with only one mbuf pool). > > > > Unfortunately, the information about the DEV_TX_OFFLOAD_MBUF_FAST_FREE = flag came to light after the techboard meeting, and I > don't have any benchmarks to support this suggestion, so I guess it's har= d to change the techboard's decision to move the pool pointer. > > >=20 > The thing with FAST_FREE is that it doesn't just indicate that there is > only one mbuf pool, but rather that none of the packets are chained mbufs > either. Hmm, wonder where such assumption comes from? There is nothing about forbidding chained mbufs in rte_ethdev.h right now: #define DEV_TX_OFFLOAD_MBUF_FAST_FREE 0x00010000 /**< Device supports optimization for fast release of mbufs. * When set application must guarantee that per-queue all mbufs comes fro= m * the same mempool and has refcnt =3D 1. */=20 > Therefore, the flag applies equally to both next and pool pointers > for optimization. [And the flag should perhaps be two flags!] >=20 I think what Morten means here: For FAST_FREE PMD can store pool pointer somewhere in its queue metadata and doesn't need to read it from the mbuf. So if we move next to first line - mbuf_free code-path for FAST_FREE case c= an avoid touching second cache line in the mbuf.=20