aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/dst.c9
-rw-r--r--net/core/neighbour.c5
-rw-r--r--net/sched/sch_generic.c2
3 files changed, 13 insertions, 3 deletions
diff --git a/net/core/dst.c b/net/core/dst.c
index 836ec6606925..1a53fb39b7e0 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -99,7 +99,14 @@ static void dst_run_gc(unsigned long dummy)
99 printk("dst_total: %d/%d %ld\n", 99 printk("dst_total: %d/%d %ld\n",
100 atomic_read(&dst_total), delayed, dst_gc_timer_expires); 100 atomic_read(&dst_total), delayed, dst_gc_timer_expires);
101#endif 101#endif
102 mod_timer(&dst_gc_timer, jiffies + dst_gc_timer_expires); 102 /* if the next desired timer is more than 4 seconds in the future
103 * then round the timer to whole seconds
104 */
105 if (dst_gc_timer_expires > 4*HZ)
106 mod_timer(&dst_gc_timer,
107 round_jiffies(jiffies + dst_gc_timer_expires));
108 else
109 mod_timer(&dst_gc_timer, jiffies + dst_gc_timer_expires);
103 110
104out: 111out:
105 spin_unlock(&dst_lock); 112 spin_unlock(&dst_lock);
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 9e26f38ea6e5..054d46493d2b 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -696,7 +696,10 @@ next_elt:
696 if (!expire) 696 if (!expire)
697 expire = 1; 697 expire = 1;
698 698
699 mod_timer(&tbl->gc_timer, now + expire); 699 if (expire>HZ)
700 mod_timer(&tbl->gc_timer, round_jiffies(now + expire));
701 else
702 mod_timer(&tbl->gc_timer, now + expire);
700 703
701 write_unlock(&tbl->lock); 704 write_unlock(&tbl->lock);
702} 705}
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index bc116bd6937c..3b6e6a780927 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -209,7 +209,7 @@ static void dev_watchdog(unsigned long arg)
209 dev->name); 209 dev->name);
210 dev->tx_timeout(dev); 210 dev->tx_timeout(dev);
211 } 211 }
212 if (!mod_timer(&dev->watchdog_timer, jiffies + dev->watchdog_timeo)) 212 if (!mod_timer(&dev->watchdog_timer, round_jiffies(jiffies + dev->watchdog_timeo)))
213 dev_hold(dev); 213 dev_hold(dev);
214 } 214 }
215 } 215 }