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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 16 Nov 2007 22:23:58 +0100
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Simon Horman <horms@...ge.net.au>
CC:	David Miller <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] IPV4 : Move ip route cache flush (secret_rebuild) from
 softirq to workqueue

Simon Horman a écrit :
> Is it ever neccessary to call cond_resched() if rt_hash_table[i].chain
> is NULL? If not, the following looks cleaner to my eyes:
> 
> 	for (i = 0; i <= rt_hash_mask; i++) {
> 		rth = rt_hash_table[i].chain;
> 		if (!rth)
> 			continue;
> 
> 		spin_lock_bh(rt_hash_lock_addr(i));
> 		rth = rt_hash_table[i].chain;
> 		rt_hash_table[i].chain = NULL;
> 		spin_unlock_bh(rt_hash_lock_addr(i));
> 
> 		...
> 

Well, it depends if the table is empty or not, and its size.

Some RT tasks want to to be wakeup every ms for example.

With a 8MB hash table (one million slots on x86_64), the full scan is longer 
than 1 ms, even if no IRQ came and stole the cpu...

-
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