[dpdk-dev] [PATCH 1/1] mbuf: move pool pointer in first half

Jerin Jacob jerinjacobk at gmail.com
Mon Nov 9 13:01:01 CET 2020


On Mon, Nov 9, 2020 at 3:17 PM Bruce Richardson
<bruce.richardson at intel.com> wrote:
>
> On Mon, Nov 09, 2020 at 01:57:26PM +0530, Jerin Jacob wrote:
> > On Mon, Nov 9, 2020 at 1:34 PM Thomas Monjalon <thomas at monjalon.net> wrote:
> > >
> > > 09/11/2020 06:18, Jerin Jacob:
> > > > On Sun, Nov 8, 2020 at 2:03 AM Thomas Monjalon <thomas at monjalon.net> wrote:
> > > > > 07/11/2020 20:05, Jerin Jacob:
> > > > > > On Sun, Nov 8, 2020 at 12:09 AM Thomas Monjalon <thomas at monjalon.net> wrote:
> > > > > > > 07/11/2020 18:12, Jerin Jacob:
> > > > > > > > On Sat, Nov 7, 2020 at 10:04 PM Thomas Monjalon <thomas at monjalon.net> wrote:
> > > > > > > > >
> > > > > > > > > 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.
> > > > > > > >
> > > > > > > > But In any event, Tx needs to touch the pool to freeing back to the
> > > > > > > > pool upon  Tx completion. Right?
> > > > > > > > Not able to understand the motivation for moving it to the first 64B cache line?
> > > > > > > > The gain varies from driver to driver. For example, a Typical
> > > > > > > > ARM-based NPU does not need to
> > > > > > > > touch the pool in Rx and its been filled by HW. Whereas it needs to
> > > > > > > > touch in Tx if the reference count is implemented.
> > > > > >
> > > > > > See below.
> > > > > >
> > > > > > > >
> > > > > > > > > Due to this change, tx_offload is moved, so some vector data paths
> > > > > > > > > may need to be adjusted. Note: OCTEON TX2 check is removed temporarily!
> > > > > > > >
> > > > > > > > It will be breaking the Tx path, Please just don't remove the static
> > > > > > > > assert without adjusting the code.
> > > > > > >
> > > > > > > Of course not.
> > > > > > > I looked at the vector Tx path of OCTEON TX2,
> > > > > > > it's close to be impossible to understand :)
> > > > > > > Please help!
> > > > > >
> > > > > > Off course. Could you check the above section any share the rationale
> > > > > > for this change
> > > > > > and where it helps and how much it helps?
> > > > >
> > > > > It has been concluded in the techboard meeting you were part of.
> > > > > I don't understand why we restart this discussion again.
> > > > > I won't have the energy to restart this process myself.
> > > > > If you don't want to apply the techboard decision, then please
> > > > > do the necessary to request another quick decision.
> > > >
> > > > Yes. Initially, I thought it is OK as we have 128B CL, After looking
> > > > into Thomas's change, I realized
> > > > it is not good for ARM64 64B catchlines based NPU as
> > > > - A Typical  ARM-based NPU does not need to touch the pool in Rx and
> > > > its been filled by HW. Whereas it needs to
> > > > touch in Tx if the reference count is implemented.
> > >
> > > Small note: It is not true for all Arm platforms.
> >
> > Yes. Generally, it is not specific to Arm platform. Any platform that
> > has HW accelerated mempool.
> >
>
> Hi Jerin, Thomas,
>
> For platforms without hw mempool support too, the same holds that the pool
> pointer should never need to be touched on RX. However, as we discussed on
> the tech board, moving the pointer may help a little some cases, and
> especially less optimized drivers, and there seemed to be no downside to
> it. Jerin, can you please clarify why moving the pool pointer would cause a
> problem?  Is it going to cause things to be slower on some systems for some
> reasons?

I overlooked on that part, No specific issue in moving first cache line.

Hi @Thomas Monjalon

Any specific reason why you removed the static assert from octeontx2.
I am not able
to compilation issue with that static assert.

The current vector driver assumes pool and tx offload needs to 2 DWORDS apart,
Which is the case before and after your change.

Please remove that static assert change, No issue from my side on this patch.


In general, it is too much effort to re-verify and measure performance
impact with
all the cases after RC2, I hope this will last mbuf change in this release.

>
> Regards,
> /Bruce


More information about the dev mailing list