From: Stephen Hemminger Date: Fri, 9 Dec 2005 19:35:09 +0000 (-0800) Subject: [PATCH] sky2: prefetch tuning X-Git-Tag: v2.6.16-rc1~474^2~22^2~7^2~25 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d70cd51ac0585a9273abea4c333e8f0dd8385d27;p=linux-2.6 [PATCH] sky2: prefetch tuning Add a couple more prefetches to where we walk the rings. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 54947ae994..39916e7cf6 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -1248,6 +1249,7 @@ static void sky2_tx_complete(struct sky2_port *sky2, u16 done) nxt = re->idx; BUG_ON(nxt >= TX_RING_SIZE); + prefetch(sky2->tx_ring + nxt); /* Check for partial status */ if (tx_dist(put, done) < tx_dist(put, nxt)) @@ -1659,6 +1661,7 @@ static struct sk_buff *sky2_receive(struct sky2_port *sky2, sky2->netdev->name, sky2->rx_next, status, length); sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending; + prefetch(sky2->rx_ring + sky2->rx_next); if (status & GMR_FS_ANY_ERR) goto error;