Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46942
b: refs/heads/master
c: f5a6e01
h: refs/heads/master
v: v3
  • Loading branch information
Arjan van de Ven authored and David S. Miller committed Feb 8, 2007
1 parent bb921c8 commit 3a9b14a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 104439a8876a98eac1b6593907a3c7bc51e362fe
refs/heads/master: f5a6e01c093ca60c0cab15c47c8e7e199fbbc9e6
9 changes: 8 additions & 1 deletion trunk/net/core/dst.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,14 @@ static void dst_run_gc(unsigned long dummy)
printk("dst_total: %d/%d %ld\n",
atomic_read(&dst_total), delayed, dst_gc_timer_expires);
#endif
mod_timer(&dst_gc_timer, jiffies + dst_gc_timer_expires);
/* if the next desired timer is more than 4 seconds in the future
* then round the timer to whole seconds
*/
if (dst_gc_timer_expires > 4*HZ)
mod_timer(&dst_gc_timer,
round_jiffies(jiffies + dst_gc_timer_expires));
else
mod_timer(&dst_gc_timer, jiffies + dst_gc_timer_expires);

out:
spin_unlock(&dst_lock);
Expand Down
5 changes: 4 additions & 1 deletion trunk/net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,10 @@ static void neigh_periodic_timer(unsigned long arg)
if (!expire)
expire = 1;

mod_timer(&tbl->gc_timer, now + expire);
if (expire>HZ)
mod_timer(&tbl->gc_timer, round_jiffies(now + expire));
else
mod_timer(&tbl->gc_timer, now + expire);

write_unlock(&tbl->lock);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static void dev_watchdog(unsigned long arg)
dev->name);
dev->tx_timeout(dev);
}
if (!mod_timer(&dev->watchdog_timer, jiffies + dev->watchdog_timeo))
if (!mod_timer(&dev->watchdog_timer, round_jiffies(jiffies + dev->watchdog_timeo)))
dev_hold(dev);
}
}
Expand Down

0 comments on commit 3a9b14a

Please sign in to comment.