Skip to content

Commit bfebbb8

Browse files
Daniel DrakeJeff Garzik
authored andcommitted
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 <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
1 parent 3459feb commit bfebbb8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/net/forcedeth.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3859,7 +3859,8 @@ static void nv_do_stats_poll(unsigned long data)
38593859
nv_get_hw_stats(dev);
38603860

38613861
if (!np->in_shutdown)
3862-
mod_timer(&np->stats_poll, jiffies + STATS_INTERVAL);
3862+
mod_timer(&np->stats_poll,
3863+
round_jiffies(jiffies + STATS_INTERVAL));
38633864
}
38643865

38653866
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)
50635064

50645065
/* start statistics timer */
50655066
if (np->driver_data & (DEV_HAS_STATISTICS_V1|DEV_HAS_STATISTICS_V2))
5066-
mod_timer(&np->stats_poll, jiffies + STATS_INTERVAL);
5067+
mod_timer(&np->stats_poll,
5068+
round_jiffies(jiffies + STATS_INTERVAL));
50675069

50685070
spin_unlock_irq(&np->lock);
50695071

0 commit comments

Comments
 (0)