From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com> To: "Richardson, Bruce" <bruce.richardson@intel.com>, Morten Brørup <mb@smartsharesystems.com> Cc: Thomas Monjalon <thomas@monjalon.net>, "dev@dpdk.org" <dev@dpdk.org>, "david.marchand@redhat.com" <david.marchand@redhat.com>, "Yigit, Ferruh" <ferruh.yigit@intel.com>, "olivier.matz@6wind.com" <olivier.matz@6wind.com>, "andrew.rybchenko@oktetlabs.ru" <andrew.rybchenko@oktetlabs.ru>, "viacheslavo@nvidia.com" <viacheslavo@nvidia.com>, "ajit.khaparde@broadcom.com" <ajit.khaparde@broadcom.com>, "jerinj@marvell.com" <jerinj@marvell.com>, "hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>, Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>, "Kiran Kumar K" <kirankumark@marvell.com>, "techboard@dpdk.org" <techboard@dpdk.org> Subject: Re: [dpdk-dev] [PATCH 1/1] mbuf: move pool pointer in first half Date: Mon, 9 Nov 2020 10:33:41 +0000 Message-ID: <DM6PR11MB3308005609F8FFC3A39F27B39AEA0@DM6PR11MB3308.namprd11.prod.outlook.com> (raw) In-Reply-To: <20201109100838.GC831@bricha3-MOBL.ger.corp.intel.com> > On Sat, Nov 07, 2020 at 07:57:05PM +0100, Morten Brørup 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 line, > > > i.e. mbuf is split in two cache lines. > > > > Perhaps with the #define DEV_TX_OFFLOAD_MBUF_FAST_FREE mentioned by Konstantin, it might be better moving m->next instead, at > least for applications with the opportunity to set this flag (e.g. applications 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 hard to change the techboard's decision to move the pool pointer. > > > > 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 from * the same mempool and has refcnt = 1. */ > Therefore, the flag applies equally to both next and pool pointers > for optimization. [And the flag should perhaps be two flags!] > 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 can avoid touching second cache line in the mbuf.
next prev parent reply other threads:[~2020-11-09 10:33 UTC|newest] Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-07 15:53 Thomas Monjalon 2020-11-07 17:12 ` Jerin Jacob 2020-11-07 18:39 ` Thomas Monjalon 2020-11-07 19:05 ` Jerin Jacob 2020-11-07 20:33 ` Thomas Monjalon 2020-11-09 5:18 ` Jerin Jacob 2020-11-09 8:04 ` Thomas Monjalon 2020-11-09 8:27 ` Jerin Jacob 2020-11-09 9:47 ` Bruce Richardson 2020-11-09 12:01 ` Jerin Jacob 2020-11-09 12:59 ` Thomas Monjalon 2020-11-09 13:35 ` Jerin Jacob 2020-11-09 14:02 ` Thomas Monjalon 2020-11-09 14:08 ` Jerin Jacob 2020-11-09 14:42 ` Thomas Monjalon 2020-11-09 14:53 ` Jerin Jacob 2020-11-09 8:16 ` Morten Brørup 2020-11-09 10:06 ` [dpdk-dev] [dpdk-techboard] " Bruce Richardson 2020-11-09 10:21 ` Morten Brørup 2020-11-09 18:04 ` Stephen Hemminger 2020-11-10 7:15 ` Morten Brørup 2020-11-07 18:57 ` [dpdk-dev] " Morten Brørup 2020-11-09 10:08 ` Bruce Richardson 2020-11-09 10:30 ` Morten Brørup 2020-11-09 10:33 ` Ananyev, Konstantin [this message] 2020-11-09 10:36 ` Bruce Richardson 2020-11-09 11:24 ` Ananyev, Konstantin 2020-11-09 21:29 ` [dpdk-dev] [PATCH v2 0/2] move mbuf pool pointer Thomas Monjalon 2020-11-09 21:29 ` [dpdk-dev] [PATCH v2 1/2] drivers: disable OCTEON TX2 in 32-bit build Thomas Monjalon 2020-11-10 18:05 ` Jerin Jacob 2020-11-09 21:29 ` [dpdk-dev] [PATCH v2 2/2] mbuf: move pool pointer in first half Thomas Monjalon 2020-11-10 10:05 ` Morten Brørup 2020-11-10 10:44 ` Thomas Monjalon 2020-11-10 16:25 ` Olivier Matz 2020-11-10 18:06 ` Jerin Jacob 2020-11-12 14:39 ` Thomas Monjalon 2020-11-10 18:08 ` Stephen Hemminger
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=DM6PR11MB3308005609F8FFC3A39F27B39AEA0@DM6PR11MB3308.namprd11.prod.outlook.com \ --to=konstantin.ananyev@intel.com \ --cc=ajit.khaparde@broadcom.com \ --cc=andrew.rybchenko@oktetlabs.ru \ --cc=bruce.richardson@intel.com \ --cc=david.marchand@redhat.com \ --cc=dev@dpdk.org \ --cc=ferruh.yigit@intel.com \ --cc=hemant.agrawal@nxp.com \ --cc=jerinj@marvell.com \ --cc=kirankumark@marvell.com \ --cc=mb@smartsharesystems.com \ --cc=mdr@ashroe.eu \ --cc=ndabilpuram@marvell.com \ --cc=nhorman@tuxdriver.com \ --cc=olivier.matz@6wind.com \ --cc=techboard@dpdk.org \ --cc=thomas@monjalon.net \ --cc=viacheslavo@nvidia.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git