diff options
author | Daniel Drake <dsd@gentoo.org> | 2008-03-18 12:07:18 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-03-26 05:18:51 +0100 |
commit | bfebbb88eca12a01fff1fbee2b8e1a4e932b799b (patch) | |
tree | bce78ced1ddcba3f6a970900350f0561fd76dd71 /drivers/net/forcedeth.c | |
parent | s2io annotations (diff) | |
download | linux-bfebbb88eca12a01fff1fbee2b8e1a4e932b799b.tar.xz linux-bfebbb88eca12a01fff1fbee2b8e1a4e932b799b.zip |
forcedeth: Use round_jiffies for stats timer
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>
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r-- | drivers/net/forcedeth.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 6f7e3fde9e7c..0272afbdff37 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -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); |