diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2017-06-21 12:56:14 +0530 |
---|---|---|
committer | Jeff Darcy <jeff@pl.atyp.us> | 2017-09-08 16:18:48 +0000 |
commit | ecc5b30289be1a63e2616733a022b3a9a35f12b7 (patch) | |
tree | 473ebd758bd88c97409fa4852f8c9dd1cd0ff1d6 /rpc/rpc-transport/socket/src/socket.h | |
parent | c6c526010fa4b9d9628e445036e8f84b00bfb9a8 (diff) |
socket: Use granular mutex locks during pollin and pollout event processing
... instead of one global lock. This is because pollin and pollout
processing code operate on mutually exclusive members of
socket_private_t. Keeping this in mind, this patch introduces
the more granular priv->in_lock and priv->out_lock locks.
For pollerr, which modifies both priv->incoming and priv->ioq, both
locks need to be taken.
Change-Id: Id7aeb608dc7755551b6b404470d5d80709c81960
BUG: 1467614
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: https://review.gluster.org/17687
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: mohammed rafi kc <rkavunga@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'rpc/rpc-transport/socket/src/socket.h')
-rw-r--r-- | rpc/rpc-transport/socket/src/socket.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.h b/rpc/rpc-transport/socket/src/socket.h index e299a3d7bd5..59110b5043a 100644 --- a/rpc/rpc-transport/socket/src/socket.h +++ b/rpc/rpc-transport/socket/src/socket.h @@ -220,7 +220,8 @@ typedef struct { }; }; struct gf_sock_incoming incoming; - pthread_mutex_t lock; + pthread_mutex_t in_lock; + pthread_mutex_t out_lock; pthread_mutex_t cond_lock; pthread_cond_t cond; int windowsize; |