aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/ev_epoll1_linux.cc
diff options
context:
space:
mode:
authorGravatar Soheil Hassas Yeganeh <soheil@google.com>2018-10-19 13:05:35 -0400
committerGravatar Soheil Hassas Yeganeh <soheil@google.com>2018-10-19 13:05:35 -0400
commit1f85f6ba33af282530e28c8e6a7dbaae0da8faed (patch)
tree1921da6632d029d04b91444dafbcd1da0a39d3f8 /src/core/lib/iomgr/ev_epoll1_linux.cc
parent20c848e88d3356195fa70dbb4fe1afee271b735a (diff)
Do not waste cache lines with unnecessary paddings.
Make sure paddings are GPR_CACHELINE_SIZE minus the size of fields in that cache line. Otherwise, we will waste an additional cache line for no good reason.
Diffstat (limited to 'src/core/lib/iomgr/ev_epoll1_linux.cc')
-rw-r--r--src/core/lib/iomgr/ev_epoll1_linux.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc
index 6ef889b0fe..0f58b4a63e 100644
--- a/src/core/lib/iomgr/ev_epoll1_linux.cc
+++ b/src/core/lib/iomgr/ev_epoll1_linux.cc
@@ -195,7 +195,7 @@ struct grpc_pollset_worker {
typedef struct pollset_neighborhood {
gpr_mu mu;
grpc_pollset* active_root;
- char pad[GPR_CACHELINE_SIZE];
+ char pad[GPR_CACHELINE_SIZE - sizeof(mu) - sizeof(active_root)];
} pollset_neighborhood;
struct grpc_pollset {