提交 f894ffa8 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

memcg: trivial cleanups

Clean up some mess made by the "Soft limit rework" series, and a few other
things.

Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 e975de99
...@@ -835,12 +835,12 @@ static bool mem_cgroup_event_ratelimit(struct mem_cgroup *memcg, ...@@ -835,12 +835,12 @@ static bool mem_cgroup_event_ratelimit(struct mem_cgroup *memcg,
} }
/* /*
* Called from rate-limitted memcg_check_events when enough * Called from rate-limited memcg_check_events when enough
* MEM_CGROUP_TARGET_SOFTLIMIT events are accumulated and it makes sure * MEM_CGROUP_TARGET_SOFTLIMIT events are accumulated and it makes sure
* that all the parents up the hierarchy will be noticed that this group * that all the parents up the hierarchy will be notified that this group
* is in excess or that it is not in excess anymore. mmecg->soft_contributed * is in excess or that it is not in excess anymore. mmecg->soft_contributed
* makes the transition a single action whenever the state flips from one to * makes the transition a single action whenever the state flips from one to
* other. * the other.
*/ */
static void mem_cgroup_update_soft_limit(struct mem_cgroup *memcg) static void mem_cgroup_update_soft_limit(struct mem_cgroup *memcg)
{ {
...@@ -1904,7 +1904,7 @@ mem_cgroup_soft_reclaim_eligible(struct mem_cgroup *memcg, ...@@ -1904,7 +1904,7 @@ mem_cgroup_soft_reclaim_eligible(struct mem_cgroup *memcg,
* If any parent up to the root in the hierarchy is over its soft limit * If any parent up to the root in the hierarchy is over its soft limit
* then we have to obey and reclaim from this group as well. * then we have to obey and reclaim from this group as well.
*/ */
while((parent = parent_mem_cgroup(parent))) { while ((parent = parent_mem_cgroup(parent))) {
if (res_counter_soft_limit_excess(&parent->res)) if (res_counter_soft_limit_excess(&parent->res))
return VISIT; return VISIT;
if (parent == root) if (parent == root)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册