lkml.org 
[lkml]   [2017]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] mm/cgroup: delay soft limit data allocation
On Wed 22-02-17 16:58:11, Laurent Dufour wrote:
[...]
> static struct mem_cgroup_tree_per_node *
> soft_limit_tree_node(int nid)
> {
> @@ -465,6 +497,8 @@ static void mem_cgroup_update_tree(struct mem_cgroup *memcg, struct page *page)
> struct mem_cgroup_tree_per_node *mctz;
>
> mctz = soft_limit_tree_from_page(page);
> + if (!mctz)
> + return;
> /*
> * Necessary to update all ancestors when hierarchy is used.
> * because their event counter is not touched.
> @@ -502,7 +536,8 @@ static void mem_cgroup_remove_from_trees(struct mem_cgroup *memcg)
> for_each_node(nid) {
> mz = mem_cgroup_nodeinfo(memcg, nid);
> mctz = soft_limit_tree_node(nid);
> - mem_cgroup_remove_exceeded(mz, mctz);
> + if (mctz)
> + mem_cgroup_remove_exceeded(mz, mctz);
> }
> }
>

this belongs to the previous patch, right?
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2017-02-22 18:12    [W:1.391 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site