lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20071218181827.5a35d634@shemminger-laptop>
Date:	Tue, 18 Dec 2007 18:18:27 -0800
From:	Stephen Hemminger <shemminger@...ux-foundation.org>
To:	parag.warudkar@...il.com, David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, akpm@...ux-foundation.org
Subject: [PATCH 1/2] net: flow hash timer power saving

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 <shemminger@...tta.com>

--- 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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ