]> err.no Git - linux-2.6/commitdiff
forcedeth: Use round_jiffies for stats timer
authorDaniel Drake <dsd@gentoo.org>
Tue, 18 Mar 2008 11:07:18 +0000 (11:07 +0000)
committerJeff Garzik <jeff@garzik.org>
Wed, 26 Mar 2008 04:18:51 +0000 (00:18 -0400)
This timer doesn't need to run at precise times, so round it to a whole
second to decrease wakeups.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/forcedeth.c

index 6f7e3fde9e7cdcbe9fa12c23eb88cad8a3dbee0e..0272afbdff37f2af7e4a77bbe4c2aaf7b30dea92 100644 (file)
@@ -3859,7 +3859,8 @@ static void nv_do_stats_poll(unsigned long data)
        nv_get_hw_stats(dev);
 
        if (!np->in_shutdown)
-               mod_timer(&np->stats_poll, jiffies + STATS_INTERVAL);
+               mod_timer(&np->stats_poll,
+                       round_jiffies(jiffies + STATS_INTERVAL));
 }
 
 static void nv_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
@@ -5063,7 +5064,8 @@ static int nv_open(struct net_device *dev)
 
        /* start statistics timer */
        if (np->driver_data & (DEV_HAS_STATISTICS_V1|DEV_HAS_STATISTICS_V2))
-               mod_timer(&np->stats_poll, jiffies + STATS_INTERVAL);
+               mod_timer(&np->stats_poll,
+                       round_jiffies(jiffies + STATS_INTERVAL));
 
        spin_unlock_irq(&np->lock);