Revise locking strategy used for UNIX domain sockets in order to improve
concurrency: - Add per-unpcb mutexes protecting unpcb connection state, fields, etc. - Replace global UNP mutex with a global UNP rwlock, which will protect the UNIX domain socket connection topology, v_socket, and be acquired exclusively before acquiring more than per-unpcb at a time in order to avoid lock order issues. In performance measurements involving MySQL, this change has little or no overhead on UP (+/- 1%), but leads to a significant (5%-30%) improvement in multi-processor measurements using the sysbench and supersmack benchmarks. Much testing by: kris Approved by: re (kensmith)
This commit is contained in:
parent
c0e767f9dd
commit
e7c33e29ed
File diff suppressed because it is too large
Load Diff
@ -79,6 +79,7 @@ struct unpcb {
|
||||
int unp_flags; /* flags */
|
||||
struct xucred unp_peercred; /* peer credentials, if applicable */
|
||||
u_int unp_refcount;
|
||||
struct mtx unp_mtx; /* mutex */
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user