All of lore.kernel.org
 help / color / mirror / Atom feed
* What's the point of RTE_MBUF_PREFETCH_TO_FREE()?
@ 2017-11-03 20:28 Mike Stolarchuk
  2017-11-06  9:25 ` Bruce Richardson
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Stolarchuk @ 2017-11-03 20:28 UTC (permalink / raw)
  To: dev

It seems to be used to prefetch the mbuf in preparation for a free of an
mbuf.

But RTE_MBUF_PREFETCH_TO_FREE() currently does a prefetch for the
ffirst cache line in the mbuf,  but doesn't a free do a put to the mbuf's
mempool?

And isn't the mempool reference in the mbuf's second cache line?

regards,
mts.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: What's the point of RTE_MBUF_PREFETCH_TO_FREE()?
  2017-11-03 20:28 What's the point of RTE_MBUF_PREFETCH_TO_FREE()? Mike Stolarchuk
@ 2017-11-06  9:25 ` Bruce Richardson
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2017-11-06  9:25 UTC (permalink / raw)
  To: Mike Stolarchuk; +Cc: dev

On Fri, Nov 03, 2017 at 01:28:18PM -0700, Mike Stolarchuk wrote:
> It seems to be used to prefetch the mbuf in preparation for a free of an
> mbuf.
> 
> But RTE_MBUF_PREFETCH_TO_FREE() currently does a prefetch for the
> ffirst cache line in the mbuf,  but doesn't a free do a put to the mbuf's
> mempool?
> 
> And isn't the mempool reference in the mbuf's second cache line?
> 
Yes, that looks like a bug. Doing "git blame" shows that that macro
comes from the original versions of DPDK pre-dpdk.org, and hasn't been
modified since, so it was missed when the mbuf was expanded from 1 line
to 2. I also note that the high-performance ixgbe/i40e vector drivers do
not use this macro, only the slow paths in those drivers do, so I wonder
if it can be removed. If not, it should be fixed.

	/Bruce

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-06  9:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03 20:28 What's the point of RTE_MBUF_PREFETCH_TO_FREE()? Mike Stolarchuk
2017-11-06  9:25 ` Bruce Richardson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.