[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1229608706.16904.31.camel@localhost.localdomain>
Date: Thu, 18 Dec 2008 14:58:26 +0100
From: Jesper Dangaard Brouer <hawk@...x.dk>
To: "David S. Miller" <davem@...emloft.net>
Cc: Robert Olsson <Robert.Olsson@...a.slu.se>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>, hawk@...x.dk
Subject: [PATCH 3/3] NIU: Implement discard counters, optimize
Optimize the lightly loaded case, by only syncronizing discards stats
when qlen > 10 indicate potential for drops.
Notice Robert Olsson might disagree with this patch.
Signed-off-by: Jesper Dangaard Brouer <hawk@...x.dk>
---
drivers/net/niu.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 9f6a98f..7746230 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -3620,7 +3620,9 @@ static int niu_rx_work(struct niu *np, struct rx_ring_info *rp, int budget)
nw64(RX_DMA_CTL_STAT(rp->rx_channel), stat);
- niu_sync_rx_discard_stats(np, rp, 0x7FFF);
+ /* Only sync discards stats when qlen indicate potential for drops */
+ if (qlen > 10)
+ niu_sync_rx_discard_stats(np, rp, 0x7FFF);
return work_done;
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists