From 78dff5a4475d0885bb130dedb3d4e748c653d3e4 Mon Sep 17 00:00:00 2001 From: Alisha Nanda Date: Fri, 16 Dec 2022 22:43:29 -0800 Subject: [PATCH] use control value for tcp (#31918) --- src/core/lib/resource_quota/memory_quota.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/lib/resource_quota/memory_quota.h b/src/core/lib/resource_quota/memory_quota.h index 2a46c177316..1b036c1e324 100644 --- a/src/core/lib/resource_quota/memory_quota.h +++ b/src/core/lib/resource_quota/memory_quota.h @@ -568,10 +568,10 @@ class MemoryQuota final // Resize the quota to new_size. void SetSize(size_t new_size) { memory_quota_->SetSize(new_size); } - // Return true if the instantaneous memory pressure is high. + // Return true if the controlled memory pressure is high. bool IsMemoryPressureHigh() const { - static constexpr double kMemoryPressureHighThreshold = 1.0; - return memory_quota_->GetPressureInfo().instantaneous_pressure > + static constexpr double kMemoryPressureHighThreshold = 0.99; + return memory_quota_->GetPressureInfo().pressure_control_value > kMemoryPressureHighThreshold; }