]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
SUNRPC: Fix a performance regression in the RPC authentication code
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 20 Nov 2008 21:06:21 +0000 (16:06 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 18 Dec 2008 17:13:39 +0000 (09:13 -0800)
commita0f04d0096bd7edb543576c55f7a0993628f924a
treed2976c88a63fff87da2c9dc4355b04f9f02b8033
parenta5330d7ca215757e9949e31f0bb88214f41fd413
SUNRPC: Fix a performance regression in the RPC authentication code

commit 23918b03060f6e572168fdde1798a905679d2e06 upstream.

Fix a regression reported by Max Kellermann whereby kernel profiling
showed that his clients were spending 45% of their time in
rpcauth_lookup_credcache.

It turns out that although his processes had identical uid/gid/groups,
generic_match() was failing to detect this, because the task->group_info
pointers were not shared. This again lead to the creation of a huge number
of identical credentials at the RPC layer.

The regression is fixed by comparing the contents of task->group_info
if the actual pointers are not identical.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/sunrpc/auth_generic.c