RFC Introduce memory allocation speed throttle in memcg
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest7 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | mm: record total charge and max speed counter in memcginclude/ init/ mm/ +1 more | +93 | 0 replies | |
| 2/7 | mm: introduce alloc_bps to memcg for memory allocation speed throttleinclude/ mm/ | +48 | 0 replies | |
| 3/7 | mm: memory allocation speed throttle setup in hierarchyinclude/ mm/ | +50 | 0 replies | |
| 4/7 | mm: introduce slice analysis into memory speed throttle mechanisminclude/ mm/ | +29 | 0 replies | |
| 5/7 | mm: introduce memory allocation speed throttleinclude/ mm/ | +99 | 0 replies | |
| 6/7 | mm: record the numbers of memory allocation throttleinclude/ mm/ | +30 | 0 replies | |
| 7/7 | mm: introduce mst low and min watermarkinclude/ mm/ | +36 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC 0/7] Introduce memory allocation speed throttle in memcg
From: Yulei Zhang <[email protected]>
In this patch set we present the idea to suppress the memory allocation speed in memory cgroup, which aims to avoid direct reclaim caused by memory allocation burst while under memory pressure.
As minimum watermark could be easily broken if certain tasks allocate massive amount of memory in a short period of time, in that case it will trigger the direct memory reclaim and cause unacceptable jitters for latency critical tasks, such as guaranteed pod task in K8s.
With memory allocation speed throttle(mst) mechanism we could lower the memory allocation speed in certian cgroup, usually for low priority tasks, so that could avoid the direct memory reclaim in time.
And per-memcg interfaces are introduced under memcg tree, not visiable for root memcg.
- <cgroup_root>/<cgroup_name>/memory.alloc_bps
- 0 -> means memory speed throttle disabled
- non-zero -> value in bytes for memory allocation speed limits
- <cgroup_root>/<cgroup_name>/memory.stat:mst_mem_spd_max
it records the max memory allocation speed of the memory cgroup in the last period of time slice
- <cgroup_root>/<cgroup_name>/memory.stat:mst_nr_throttled it represents the number of times for allocation throttling
Yulei Zhang (7):
mm: record total charge and max speed counter in memcg
mm: introduce alloc_bps to memcg for memory allocation speed throttle
mm: memory allocation speed throttle setup in hierarchy
mm: introduce slice analysis into memory speed throttle mechanism
mm: introduce memory allocation speed throttle
mm: record the numbers of memory allocation throttle
mm: introduce mst low and min watermark
include/linux/memcontrol.h | 23 +++ include/linux/page_counter.h | 8 + init/Kconfig | 8 + mm/memcontrol.c | 295 +++++++++++++++++++++++++++++++++++ mm/page_counter.c | 39 +++++ 5 files changed, 373 insertions(+)
Signature · 1 line
2.28.0