From: Michal Hocko <mhocko@suse.cz> To: Johannes Weiner <hannes@cmpxchg.org> Cc: Andrew Morton <akpm@linux-foundation.org>, Vladimir Davydov <vdavydov@parallels.com>, linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [patch 1/3] mm: memcontrol: remove unnecessary soft limit tree node test Date: Tue, 13 Jan 2015 15:50:53 +0100 [thread overview] Message-ID: <20150113145053.GG25318@dhcp22.suse.cz> (raw) In-Reply-To: <1420856041-27647-1-git-send-email-hannes@cmpxchg.org> On Fri 09-01-15 21:13:59, Johannes Weiner wrote: > kzalloc_node() automatically falls back to nodes with suitable memory. > > Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Michal Hocko <mhocko@suse.cz> > --- > mm/memcontrol.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index fd9e542fc26f..aad254b30708 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -4520,13 +4520,10 @@ static void __init mem_cgroup_soft_limit_tree_init(void) > { > struct mem_cgroup_tree_per_node *rtpn; > struct mem_cgroup_tree_per_zone *rtpz; > - int tmp, node, zone; > + int node, zone; > > for_each_node(node) { > - tmp = node; > - if (!node_state(node, N_NORMAL_MEMORY)) > - tmp = -1; > - rtpn = kzalloc_node(sizeof(*rtpn), GFP_KERNEL, tmp); > + rtpn = kzalloc_node(sizeof(*rtpn), GFP_KERNEL, node); > BUG_ON(!rtpn); > > soft_limit_tree.rb_tree_per_node[node] = rtpn; > -- > 2.2.0 > -- Michal Hocko SUSE Labs
WARNING: multiple messages have this Message-ID (diff)
From: Michal Hocko <mhocko@suse.cz> To: Johannes Weiner <hannes@cmpxchg.org> Cc: Andrew Morton <akpm@linux-foundation.org>, Vladimir Davydov <vdavydov@parallels.com>, linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [patch 1/3] mm: memcontrol: remove unnecessary soft limit tree node test Date: Tue, 13 Jan 2015 15:50:53 +0100 [thread overview] Message-ID: <20150113145053.GG25318@dhcp22.suse.cz> (raw) In-Reply-To: <1420856041-27647-1-git-send-email-hannes@cmpxchg.org> On Fri 09-01-15 21:13:59, Johannes Weiner wrote: > kzalloc_node() automatically falls back to nodes with suitable memory. > > Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Michal Hocko <mhocko@suse.cz> > --- > mm/memcontrol.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index fd9e542fc26f..aad254b30708 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -4520,13 +4520,10 @@ static void __init mem_cgroup_soft_limit_tree_init(void) > { > struct mem_cgroup_tree_per_node *rtpn; > struct mem_cgroup_tree_per_zone *rtpz; > - int tmp, node, zone; > + int node, zone; > > for_each_node(node) { > - tmp = node; > - if (!node_state(node, N_NORMAL_MEMORY)) > - tmp = -1; > - rtpn = kzalloc_node(sizeof(*rtpn), GFP_KERNEL, tmp); > + rtpn = kzalloc_node(sizeof(*rtpn), GFP_KERNEL, node); > BUG_ON(!rtpn); > > soft_limit_tree.rb_tree_per_node[node] = rtpn; > -- > 2.2.0 > -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-01-13 14:50 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-01-10 2:13 [patch 1/3] mm: memcontrol: remove unnecessary soft limit tree node test Johannes Weiner 2015-01-10 2:13 ` Johannes Weiner 2015-01-10 2:14 ` [patch 2/3] mm: memcontrol: consolidate memory controller initialization Johannes Weiner 2015-01-10 2:14 ` Johannes Weiner 2015-01-10 2:14 ` Johannes Weiner 2015-01-12 11:14 ` Vladimir Davydov 2015-01-12 11:14 ` Vladimir Davydov 2015-01-13 14:53 ` Michal Hocko 2015-01-13 14:53 ` Michal Hocko [not found] ` <1420856041-27647-1-git-send-email-hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org> 2015-01-10 2:14 ` Johannes Weiner 2015-01-10 2:14 ` [patch 3/3] mm: memcontrol: consolidate swap controller code Johannes Weiner 2015-01-10 2:14 ` Johannes Weiner 2015-01-10 2:14 ` Johannes Weiner 2015-01-10 2:14 ` Johannes Weiner 2015-01-12 11:22 ` Vladimir Davydov 2015-01-12 11:22 ` Vladimir Davydov 2015-01-12 11:22 ` Vladimir Davydov 2015-01-13 15:01 ` Michal Hocko 2015-01-13 15:01 ` Michal Hocko 2015-01-13 15:01 ` Michal Hocko 2015-01-12 11:11 ` [patch 1/3] mm: memcontrol: remove unnecessary soft limit tree node test Vladimir Davydov 2015-01-12 11:11 ` Vladimir Davydov 2015-01-12 11:11 ` Vladimir Davydov 2015-01-13 14:50 ` Michal Hocko [this message] 2015-01-13 14:50 ` Michal Hocko -- strict thread matches above, loose matches on Subject: below -- 2015-01-10 2:13 Johannes Weiner 2015-01-10 2:13 Johannes Weiner
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20150113145053.GG25318@dhcp22.suse.cz \ --to=mhocko@suse.cz \ --cc=akpm@linux-foundation.org \ --cc=cgroups@vger.kernel.org \ --cc=hannes@cmpxchg.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=vdavydov@parallels.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.