Re: [PATCH 3/3] Convert the UDP hash lock to RCU
From: David Miller <davem@davemloft.net>
Date: 2008-10-08 18:46:07
Also in:
lkml
From: David Miller <davem@davemloft.net>
Date: 2008-10-08 18:46:07
Also in:
lkml
From: Eric Dumazet <redacted> Date: Wed, 08 Oct 2008 15:55:36 +0200
David Miller a écrit :quoted
From: Stephen Hemminger <redacted> Date: Tue, 7 Oct 2008 16:07:29 +0200quoted
The idea of keeping chains short is the problem. That code should just be pulled because it doesn't help that much, and also creates bias on the port randomization.I have that patch from Vitaly Mayatskikh which does exactly this. I keep looking at it, but I can't bring myself to apply it since I'm not completely convinced.Vitaly patch might be appropriate if only few UDP ports are opened. We could zap the code to search short chains and extend Vitaly's idea with following patch :
I really like this, and I've applied it to net-next-2.6 I think the "increment until back in range" do/while loop can be improved a bit. It can spin for more than 60,000 iterations in some edge case scenerios as-is :-) Ugh, there's also that expensive divide in there for the modulus.