[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081008.114527.189056050.davem@davemloft.net>
Date: Wed, 08 Oct 2008 11:45:27 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: dada1@...mosbay.com
Cc: shemminger@...tta.com, benny+usenet@...rsen.dk, minyard@....org,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
paulmck@...ux.vnet.ibm.com
Subject: Re: [PATCH 3/3] Convert the UDP hash lock to RCU
From: Eric Dumazet <dada1@...mosbay.com>
Date: Wed, 08 Oct 2008 15:55:36 +0200
> David Miller a écrit :
> > From: Stephen Hemminger <shemminger@...tta.com>
> > Date: Tue, 7 Oct 2008 16:07:29 +0200
> >
> >> 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.
--
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