lkml.org 
[lkml]   [2010]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tcp: md5 signature check scaling
On Wed, 27 Oct 2010 16:52:30 +0400
Dmitry Popov <dp@highloadlab.com> wrote:

> From: Dmitry Popov <dp@highloadlab.com>
>
> TCP MD5 signature checking without socket lock.
>
> Each tcp_sock has 2 RCU-protected arrays (tcp[46]_md5sig_info) of
> tcp[46]_md5sig_key address-key pairs.
> Each key (tcp_md5sig_key) has kref struct so that there is no need to
> lock the whole array to work with one key.
>
> MD5 functions were rewritten according to above statement and hash
> check (tcp_v4_inbound_md5_hash) was moved before socket lock.
>
> Signed-off-by: Dmitry Popov <dp@highloadlab.com>

You traded locking for ref counting which may not be as big
a win as your think.

Also, the overhead of RCU here might impact tests that involve
lots of socket creation and destruction.

--


\
 
 \ /
  Last update: 2010-10-27 17:59    [W:0.093 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site