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 [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html