提交 6c4e1cc3 编写于 作者: X Xu Yu

alinux: mm, memcg: account throttle over memory.high for memcg direct reclaim

to #26424368

Commit 6202ab24 ("mm, memcg: throttle
allocators when failing reclaim over memory.high") introduces explicit
throttling when reclaim is failing to keep memcg size contained at the
memory.high setting.

Just account this latency on memcg direct reclaim latency histogram.
Signed-off-by: NXu Yu <xuyu@linux.alibaba.com>
Reviewed-by: NXunlei Pang <xlpang@linux.alibaba.com>
Reviewed-by: NYang Shi <yang.shi@linux.alibaba.com>
上级 ddfd4d5e
...@@ -2463,8 +2463,6 @@ void mem_cgroup_handle_over_high(void) ...@@ -2463,8 +2463,6 @@ void mem_cgroup_handle_over_high(void)
memcg = get_mem_cgroup_from_mm(current->mm); memcg = get_mem_cgroup_from_mm(current->mm);
start = ktime_get_ns(); start = ktime_get_ns();
reclaim_high(memcg, nr_pages, GFP_KERNEL); reclaim_high(memcg, nr_pages, GFP_KERNEL);
memcg_lat_stat_update(MEM_LAT_MEMCG_DIRECT_RECLAIM,
(ktime_get_ns() - start));
current->memcg_nr_pages_over_high = 0; current->memcg_nr_pages_over_high = 0;
/* /*
...@@ -2533,6 +2531,8 @@ void mem_cgroup_handle_over_high(void) ...@@ -2533,6 +2531,8 @@ void mem_cgroup_handle_over_high(void)
psi_memstall_leave(&pflags); psi_memstall_leave(&pflags);
out: out:
memcg_lat_stat_update(MEM_LAT_MEMCG_DIRECT_RECLAIM,
(ktime_get_ns() - start));
css_put(&memcg->css); css_put(&memcg->css);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册