mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
[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>
This commit is contained in:
parent
d83d8461f9
commit
fbe9cc4a87
3 changed files with 20 additions and 20 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue