summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorwilly tarreau <w@1wt.eu>2014-01-16 11:20:15 +0400
committerDavid S. Miller <davem@davemloft.net>2014-01-17 03:15:42 +0400
commit34e4179df65d72d83e71860b099d71e0f3aa1210 (patch)
tree6d3a62c8c722167df171b9f5a553eff8fb492879 /drivers
parent5428213c042b572d10418fe22cc3c1c682631cad (diff)
downloadlinux-34e4179df65d72d83e71860b099d71e0f3aa1210.tar.xz
net: mvneta: prefetch next rx descriptor instead of current one
Currently, the mvneta driver tries to prefetch the current Rx descriptor during read. Tests have shown that prefetching the next one instead increases general performance by about 1% on HTTP traffic. Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Gregory CLEMENT <gregory.clement@free-electrons.com> Tested-by: Arnaud Ebalard <arno@natisbad.org> Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/marvell/mvneta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index aa3a4f7c3f7c..c7b37e07f870 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -611,6 +611,7 @@ 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;
}
@@ -1442,7 +1443,6 @@ static int mvneta_rx(struct mvneta_port *pp, int rx_todo,
u32 rx_status;
int rx_bytes, err;
- prefetch(rx_desc);
rx_done++;
rx_filled++;
rx_status = rx_desc->status;