summaryrefslogtreecommitdiffstats
path: root/net/unix/garbage.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2005-12-14 08:26:29 +0100
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-03 22:10:59 +0100
commitfbe9cc4a87030d5cad5f944ffaef6af7efd119e4 (patch)
treef4e9ce6608e1b8b7e160e44e68853a2b6e5e84d5 /net/unix/garbage.c
parent[IP_SOCKGLUE]: Remove most of the tcp specific calls (diff)
downloadlinux-fbe9cc4a87030d5cad5f944ffaef6af7efd119e4.tar.xz
linux-fbe9cc4a87030d5cad5f944ffaef6af7efd119e4.zip
[AF_UNIX]: Use spinlock for unix_table_lock
This lock is actually taken mostly as a writer, so using a rwlock actually just makes performance worse especially on chips like the Intel P4. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/garbage.c')
-rw-r--r--net/unix/garbage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/unix/garbage.c b/net/unix/garbage.c
index 6ffc64e1712d..411802bd4d37 100644
--- a/net/unix/garbage.c
+++ b/net/unix/garbage.c
@@ -182,7 +182,7 @@ void unix_gc(void)
if (down_trylock(&unix_gc_sem))
return;
- read_lock(&unix_table_lock);
+ spin_lock(&unix_table_lock);
forall_unix_sockets(i, s)
{
@@ -301,7 +301,7 @@ void unix_gc(void)
}
u->gc_tree = GC_ORPHAN;
}
- read_unlock(&unix_table_lock);
+ spin_unlock(&unix_table_lock);
/*
* Here we are. Hitlist is filled. Die.