Subject: Re: [net-next-2.6 PATCH v7 2/7 RFC] TCPCT part 1b: generate Responder Cookie secret

From: William Allen Simpson <[email-masked]>
Date: Sat, 21 Nov 2009 11:09:40 -0500

David Miller wrote:
> From: Andi Kleen <[email-masked]>
> Date: Fri, 20 Nov 2009 21:47:17 +0100
> 
>> David Miller <[email-masked]> writes:
>>
>>> From: William Allen Simpson <[email-masked]>
>>> Date: Fri, 20 Nov 2009 09:23:21 -0500
>>>
>>>> +static DEFINE_SPINLOCK(tcp_secret_locker);
>>> So connection creation scalability will be limited now because
>>> we'll always have to go through this centralized spinlock even
>>> for independent listening sockets, right?
>> I was about to complain about the same thing in a earlier version
>> of this patch kit, but then I noticed the spin lock aquiring 
>> is guarded by
>>
>> if (unlikely(time_after_eq(jiffy, tcp_secret_generating->expires))) {
>>
>> which presumably makes it rare enough?
> 
> Works for me.
> 
Roughly once every 10 minutes.  In the original code with rw_lock()
that would have been more frequent on the read side, but the RCU
technique speeds that up considerably?

Also, not every listening socket, just sockets after a cookie option
arrives.  That will probably be only a few selected sockets, at least
for the time being.