Skip to content
Commit 3c7d01f6 authored by Pavel Emelyanov's avatar Pavel Emelyanov
Browse files

net: Pre-create nl diag sk



The setns() syscall (called by switch_ns()) can be extremely
slow. If we call it two or more times from the same task the
kernel will synchonously go on a very slow routine called
synchronize_rcu() trying to put a reference on old namespaces.

To avoid doing this more than once I propose to create all
per-ns sockets in one place with one setns call. In this
patch there's on nl diag socket used to collect other sockets
is created this way.

Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent 4f9acb6a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment