The net flow hash randomization timer runs every 10 minutes.
This time is low priority and doesn't need to wakeup the CPU.

Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]>

--- a/net/core/flow.c   2007-12-18 07:43:31.000000000 -0800
+++ b/net/core/flow.c   2007-12-18 07:44:32.000000000 -0800
@@ -81,8 +81,8 @@ static void flow_cache_new_hashrnd(unsig
        for_each_possible_cpu(i)
                flow_hash_rnd_recalc(i) = 1;
 
-       flow_hash_rnd_timer.expires = jiffies + FLOW_HASH_RND_PERIOD;
-       add_timer(&flow_hash_rnd_timer);
+       mod_timer(&flow_hash_rnd_timer,
+                 round_jiffies(jiffies + FLOW_HASH_RND_PERIOD));
 }
 
 static void flow_entry_kill(int cpu, struct flow_cache_entry *fle)
@@ -352,7 +352,7 @@ static int __init flow_cache_init(void)
        flow_lwm = 2 * flow_hash_size;
        flow_hwm = 4 * flow_hash_size;
 
-       init_timer(&flow_hash_rnd_timer);
+       init_timer_deferrable(&flow_hash_rnd_timer);
        flow_hash_rnd_timer.function = flow_cache_new_hashrnd;
        flow_hash_rnd_timer.expires = jiffies + FLOW_HASH_RND_PERIOD;
        add_timer(&flow_hash_rnd_timer);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to