Commit bfebbb88 authored by Daniel Drake's avatar Daniel Drake Committed by Jeff Garzik

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: default avatarDaniel Drake <dsd@gentoo.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 3459feb8
...@@ -3859,7 +3859,8 @@ static void nv_do_stats_poll(unsigned long data) ...@@ -3859,7 +3859,8 @@ static void nv_do_stats_poll(unsigned long data)
nv_get_hw_stats(dev); nv_get_hw_stats(dev);
if (!np->in_shutdown) 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) 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) ...@@ -5063,7 +5064,8 @@ static int nv_open(struct net_device *dev)
/* start statistics timer */ /* start statistics timer */
if (np->driver_data & (DEV_HAS_STATISTICS_V1|DEV_HAS_STATISTICS_V2)) 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); spin_unlock_irq(&np->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment