* [PATCH] net: mvneta: remove useless RX descriptor prefetch
[not found] <1459406190-2334-1-git-send-email-jszhang@marvell.com>
@ 2016-03-31 6:45 ` Jisheng Zhang
2016-03-31 7:15 ` Jisheng Zhang
0 siblings, 1 reply; 2+ messages in thread
From: Jisheng Zhang @ 2016-03-31 6:45 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
+ linux arm kernel
On Thu, 31 Mar 2016 14:36:30 +0800 Jisheng Zhang wrote:
> The rx descriptors are allocated using dma_alloc_coherent, so prefetch
> doesn't really happen at all.
This is for RFC, I'm sorry to send it without changing its title -- s/PATCH/RFC.
I'm not sure whether there's any benefit to prefetch on space allocated from
dma_alloc_coherent.
Thanks
>
> Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
> ---
> drivers/net/ethernet/marvell/mvneta.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> index 5880871..6c09a27 100644
> --- a/drivers/net/ethernet/marvell/mvneta.c
> +++ b/drivers/net/ethernet/marvell/mvneta.c
> @@ -757,7 +757,6 @@ mvneta_rxq_next_desc_get(struct mvneta_rx_queue *rxq)
> int rx_desc = rxq->next_desc_to_proc;
>
> rxq->next_desc_to_proc = MVNETA_QUEUE_NEXT_DESC(rxq, rx_desc);
> - prefetch(rxq->descs + rxq->next_desc_to_proc);
> return rxq->descs + rx_desc;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] net: mvneta: remove useless RX descriptor prefetch
2016-03-31 6:45 ` [PATCH] net: mvneta: remove useless RX descriptor prefetch Jisheng Zhang
@ 2016-03-31 7:15 ` Jisheng Zhang
0 siblings, 0 replies; 2+ messages in thread
From: Jisheng Zhang @ 2016-03-31 7:15 UTC (permalink / raw)
To: linux-arm-kernel
Hi all,
On Thu, 31 Mar 2016 14:45:37 +0800 Jisheng Zhang wrote:
> Hi,
>
> + linux arm kernel
>
> On Thu, 31 Mar 2016 14:36:30 +0800 Jisheng Zhang wrote:
>
> > The rx descriptors are allocated using dma_alloc_coherent, so prefetch
> > doesn't really happen at all.
>
> This is for RFC, I'm sorry to send it without changing its title -- s/PATCH/RFC.
>
> I'm not sure whether there's any benefit to prefetch on space allocated from
> dma_alloc_coherent.
After more consideration, I think my patch is wrong.
As for coherent platforms, the space allocated from dma_alloc_coherent is
cacheable, so prefetch would definitely benefit us.
As for noncoherent platforms, the space allocated from dma_alloc_coherent is
uncacheable, but prefetch on arm/arm64 is implemented via. pld/prfm, the op
would be nop if target address is uncacheable.
So let's drop this patch.
Thanks,
Jisheng
>
> Thanks
>
> >
> > Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
> > ---
> > drivers/net/ethernet/marvell/mvneta.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> > index 5880871..6c09a27 100644
> > --- a/drivers/net/ethernet/marvell/mvneta.c
> > +++ b/drivers/net/ethernet/marvell/mvneta.c
> > @@ -757,7 +757,6 @@ mvneta_rxq_next_desc_get(struct mvneta_rx_queue *rxq)
> > int rx_desc = rxq->next_desc_to_proc;
> >
> > rxq->next_desc_to_proc = MVNETA_QUEUE_NEXT_DESC(rxq, rx_desc);
> > - prefetch(rxq->descs + rxq->next_desc_to_proc);
> > return rxq->descs + rx_desc;
> > }
> >
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-31 7:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1459406190-2334-1-git-send-email-jszhang@marvell.com>
2016-03-31 6:45 ` [PATCH] net: mvneta: remove useless RX descriptor prefetch Jisheng Zhang
2016-03-31 7:15 ` Jisheng Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).