From 1f15f215403d530b93f3623bd4960eca2ddf3c91 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 8 Dec 2022 17:35:02 -0800 Subject: [PATCH] Revert "Revert "Revert "[experiments] Enable memory_pressure_controller for debug builds (#31811)" (#31824)" (#31832)" (#31846) This reverts commit 322e85253ed27389c73454c6d5c12f6a5689e686. --- bazel/experiments.bzl | 4 +--- src/core/lib/experiments/experiments.cc | 2 +- src/core/lib/experiments/experiments.yaml | 2 +- src/core/lib/resource_quota/memory_quota.h | 7 +++---- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/bazel/experiments.bzl b/bazel/experiments.bzl index c55ebeda0df..b2cb2695f15 100644 --- a/bazel/experiments.bzl +++ b/bazel/experiments.bzl @@ -24,9 +24,6 @@ EXPERIMENTS = { "hpack_test": [ "new_hpack_huffman_decoder", ], - "resource_quota_test": [ - "memory_pressure_controller", - ], }, "off": { "core_end2end_test": [ @@ -48,6 +45,7 @@ EXPERIMENTS = { "promise_based_client_call", ], "resource_quota_test": [ + "memory_pressure_controller", "unconstrained_max_quota_buffer_size", ], }, diff --git a/src/core/lib/experiments/experiments.cc b/src/core/lib/experiments/experiments.cc index 2249e83b57e..86812251435 100644 --- a/src/core/lib/experiments/experiments.cc +++ b/src/core/lib/experiments/experiments.cc @@ -67,7 +67,7 @@ const ExperimentMetadata g_experiment_metadata[] = { {"peer_state_based_framing", description_peer_state_based_framing, false}, {"flow_control_fixes", description_flow_control_fixes, true}, {"memory_pressure_controller", description_memory_pressure_controller, - kDefaultForDebugOnly}, + false}, {"unconstrained_max_quota_buffer_size", description_unconstrained_max_quota_buffer_size, false}, {"new_hpack_huffman_decoder", description_new_hpack_huffman_decoder, diff --git a/src/core/lib/experiments/experiments.yaml b/src/core/lib/experiments/experiments.yaml index 6326426c939..c66134cc214 100644 --- a/src/core/lib/experiments/experiments.yaml +++ b/src/core/lib/experiments/experiments.yaml @@ -80,7 +80,7 @@ - name: memory_pressure_controller description: New memory pressure controller - default: debug + default: false expiry: 2023/01/01 owner: ctiller@google.com test_tags: [resource_quota_test] diff --git a/src/core/lib/resource_quota/memory_quota.h b/src/core/lib/resource_quota/memory_quota.h index 38c4971294b..c0da890ed58 100644 --- a/src/core/lib/resource_quota/memory_quota.h +++ b/src/core/lib/resource_quota/memory_quota.h @@ -280,12 +280,12 @@ class BasicMemoryQuota final // Data about current memory pressure. struct PressureInfo { // The current instantaneously measured memory pressure. - double instantaneous_pressure = 0.0; + double instantaneous_pressure; // A control value that can be used to scale buffer sizes up or down to // adjust memory pressure to our target set point. - double pressure_control_value = 0.0; + double pressure_control_value; // Maximum recommended individual allocation size. - size_t max_recommended_allocation_size = 0; + size_t max_recommended_allocation_size; }; explicit BasicMemoryQuota(std::string name) : name_(std::move(name)) {} @@ -460,7 +460,6 @@ class MemoryOwner final : public MemoryAllocator { // Instantaneous memory pressure in the underlying quota. BasicMemoryQuota::PressureInfo GetPressureInfo() const { - if (!is_valid()) return BasicMemoryQuota::PressureInfo{}; return impl()->GetPressureInfo(); }