From 7b2dd93362099eef75b49fe33b93692bb148b93f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 16 Mar 2017 16:25:12 -0700 Subject: Track milliseconds since process start in timer heap Allows reducing a lock-then-check to an atomic load and check on the fast path of timer checks. Reduces locks per RPC by about 5. --- src/core/lib/iomgr/timer_generic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib/iomgr/timer_generic.h') diff --git a/src/core/lib/iomgr/timer_generic.h b/src/core/lib/iomgr/timer_generic.h index 1608dce9fb..c79a431aa0 100644 --- a/src/core/lib/iomgr/timer_generic.h +++ b/src/core/lib/iomgr/timer_generic.h @@ -38,7 +38,7 @@ #include "src/core/lib/iomgr/exec_ctx.h" struct grpc_timer { - gpr_timespec deadline; + gpr_atm deadline; uint32_t heap_index; /* INVALID_HEAP_INDEX if not in heap */ bool pending; struct grpc_timer *next; -- cgit v1.2.3