From: Pavel Emelyanov Date: Fri, 28 Mar 2008 23:38:43 +0000 (-0700) Subject: [SOCK]: Introduce a percpu inuse counters array (v2). X-Git-Tag: v2.6.26-rc1~1138^2~281 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1338d466d9c3f8a65cc6d83c629cd906f2a989f8;p=pandora-kernel.git [SOCK]: Introduce a percpu inuse counters array (v2). And redirect sock_prot_inuse_add and _get to use one. As far as the dereferences are concerned. Before the patch we made 1 dereference to proto->inuse.add call, the call itself and then called the __get_cpu_var() on a static variable. After the patch we make a direct call, then one dereference to proto->inuse_idx and then the same __get_cpu_var() on a still static variable. So this patch doesn't seem to produce performance penalty on SMP. This is not per-net yet, but I will deliberately make NET_NS=y case separated from NET_NS=n one, since it'll cost us one-or-two more dereferences to get the struct net and the inuse counter. Signed-off-by: Pavel Emelyanov Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- Reading git-diff-tree failed