diff options
author | Yang Gao <yangg@google.com> | 2018-09-27 09:08:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-27 09:08:35 -0700 |
commit | e59a26eb06a476a14fc122565058f04626f392ce (patch) | |
tree | 60c95fcc8bcf2ec35f85d3da455602864e0cc728 | |
parent | 2947946871452b2b49b0c657b43ee32158acfc79 (diff) | |
parent | 0535f659f73e6f0073782691b2afa03ca6e6970f (diff) |
Merge pull request #16700 from soheilhy/timer-shards
Increase the maximum number of timer shards to 32.
-rw-r--r-- | src/core/lib/iomgr/timer_generic.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/timer_generic.cc b/src/core/lib/iomgr/timer_generic.cc index 008d37119a..aba5539199 100644 --- a/src/core/lib/iomgr/timer_generic.cc +++ b/src/core/lib/iomgr/timer_generic.cc @@ -256,7 +256,7 @@ static grpc_millis compute_min_deadline(timer_shard* shard) { static void timer_list_init() { uint32_t i; - g_num_shards = GPR_MIN(1, 2 * gpr_cpu_num_cores()); + g_num_shards = GPR_CLAMP(2 * gpr_cpu_num_cores(), 1, 32); g_shards = static_cast<timer_shard*>(gpr_zalloc(g_num_shards * sizeof(*g_shards))); g_shard_queue = static_cast<timer_shard**>( |