mm: memcg: fix memory.high allocator throttling
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | mm: memcg: fix zero throttle delay on 32-bit kernelsmm/ | +8 | 1 reply | |
| 2/2 | mm: memcg: fix memory.high throttle lost to u64 overflowmm/ | +11 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] mm: memcg: fix memory.high allocator throttling
From: Hui Zhu <[email protected]>
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(-)
Signature · 1 line
2.53.0