[PATCH 0/2] mm: memcg: fix memory.high allocator throttling

From: Hui Zhu

Date: Tue Nov 17 2026 - 03:04:37 EST


From: Hui Zhu <zhuhui@xxxxxxxxxx>

calculate_high_delay() converts how far a cgroup is over memory.high or
memory.swap.high into a sleep penalty. Two defects corrupt that penalty,
and since the caller treats "penalty_jiffies <= HZ / 100" as "nothing to
do", a small result silently skips both the throttle and the
MAX_RECLAIM_RETRIES reclaim loop.

1/2: the u64 product is stored in an unsigned long before being shifted
right 34 bits, so on 32-bit kernels it truncates to zero and no overage
ever produces a penalty. Broken since v5.6.

2/2: the u64 product itself overflows once a cgroup is about 130x over its
limit, leaving an arbitrary result that can be zero. memory.high has no
lower bound, so a one page limit with a few MB of usage gets there. Also
affects 64-bit kernels.

Both touch calculate_high_delay(), so apply in order. Different Fixes
tags, both for stable.

Hui Zhu (2):
mm: memcg: fix zero throttle delay on 32-bit kernels
mm: memcg: fix memory.high throttle lost to u64 overflow

mm/memcontrol.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)

--
2.53.0