From: Christoph Lameter <cl@linux.com> To: Michal Hocko <mhocko@suse.cz> Cc: Johannes Weiner <hannes@cmpxchg.org>, Guenter Roeck <linux@roeck-us.net>, akpm@linux-foundation.org, mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-next@vger.kernel.org, Stephen Rothwell <sfr@canb.auug.org.au> Subject: Re: mmotm 2015-01-22-15-04: qemu failure due to 'mm: memcontrol: remove unnecessary soft limit tree node test' Date: Wed, 28 Jan 2015 09:03:06 -0600 (CST) [thread overview] Message-ID: <alpine.DEB.2.11.1501280900000.31753@gentwo.org> (raw) In-Reply-To: <20150127172439.GA8623@dhcp22.suse.cz> On Tue, 27 Jan 2015, Michal Hocko wrote: > Admittedly, I was checking only SLAB allocator when reviewing and > assuming SLUB would behave in the same way :/ > But maybe I have misinterpreted the slab code as well and > get_node(struct kmem_cache *, int node) returns non-NULL for !online > nodes. Oh. Just allocate from node 12345 in SLAB and you will also have a strange failure. > I have briefly checked the code and it seems that many users are aware > of this and use the same construct Johannes used in the end or they use > cpu_to_node. But then there are other users doing: > net/openvswitch/flow_table.c: > /* Initialize the default stat node. */ > stats = kmem_cache_alloc_node(flow_stats_cache, > GFP_KERNEL | __GFP_ZERO, 0); > > and this can blow up if Node0 is not online. I haven't checked other Node 0 is special in many architectures and is guaranteed to exist. PowerPC is a notable exception which causes frequent issues with NUMA changes. > That being said I have no problem with checking node_online in the memcg > code which was reported to blow up here. I am just thinking whether it > is safe to simply blow up like that. Node numbers must be legitimate in order to be used. Same thing with processor numbers. We cannot always check if they are online. The numbers in use must be sane. We have notifier subsystems that do callbacks to allow subsystems to add and remove new nodes and processors. Those should be used to ensure that only legitimate node and processor numbers are used.
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Lameter <cl@linux.com> To: Michal Hocko <mhocko@suse.cz> Cc: Johannes Weiner <hannes@cmpxchg.org>, Guenter Roeck <linux@roeck-us.net>, akpm@linux-foundation.org, mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-next@vger.kernel.org, Stephen Rothwell <sfr@canb.auug.org.au> Subject: Re: mmotm 2015-01-22-15-04: qemu failure due to 'mm: memcontrol: remove unnecessary soft limit tree node test' Date: Wed, 28 Jan 2015 09:03:06 -0600 (CST) [thread overview] Message-ID: <alpine.DEB.2.11.1501280900000.31753@gentwo.org> (raw) In-Reply-To: <20150127172439.GA8623@dhcp22.suse.cz> On Tue, 27 Jan 2015, Michal Hocko wrote: > Admittedly, I was checking only SLAB allocator when reviewing and > assuming SLUB would behave in the same way :/ > But maybe I have misinterpreted the slab code as well and > get_node(struct kmem_cache *, int node) returns non-NULL for !online > nodes. Oh. Just allocate from node 12345 in SLAB and you will also have a strange failure. > I have briefly checked the code and it seems that many users are aware > of this and use the same construct Johannes used in the end or they use > cpu_to_node. But then there are other users doing: > net/openvswitch/flow_table.c: > /* Initialize the default stat node. */ > stats = kmem_cache_alloc_node(flow_stats_cache, > GFP_KERNEL | __GFP_ZERO, 0); > > and this can blow up if Node0 is not online. I haven't checked other Node 0 is special in many architectures and is guaranteed to exist. PowerPC is a notable exception which causes frequent issues with NUMA changes. > That being said I have no problem with checking node_online in the memcg > code which was reported to blow up here. I am just thinking whether it > is safe to simply blow up like that. Node numbers must be legitimate in order to be used. Same thing with processor numbers. We cannot always check if they are online. The numbers in use must be sane. We have notifier subsystems that do callbacks to allow subsystems to add and remove new nodes and processors. Those should be used to ensure that only legitimate node and processor numbers are used. -- 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-29 5:36 UTC|newest] Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-01-22 23:05 mmotm 2015-01-22-15-04 uploaded akpm 2015-01-22 23:05 ` akpm 2015-01-23 5:04 ` mmotm 2015-01-22-15-04: qemu failures due to 'mm: account pmd page tables to the process' Guenter Roeck 2015-01-23 5:04 ` Guenter Roeck 2015-01-23 11:13 ` Kirill A. Shutemov 2015-01-23 11:13 ` Kirill A. Shutemov 2015-01-23 11:13 ` Kirill A. Shutemov 2015-01-23 15:07 ` Guenter Roeck 2015-01-23 15:07 ` Guenter Roeck 2015-01-23 21:55 ` Andrew Morton 2015-01-23 21:55 ` Andrew Morton 2015-01-24 2:44 ` Guenter Roeck 2015-01-24 2:44 ` Guenter Roeck 2015-01-24 3:05 ` Guenter Roeck 2015-01-24 3:05 ` Guenter Roeck 2015-01-24 5:52 ` Guenter Roeck 2015-01-24 5:52 ` Guenter Roeck 2015-01-26 12:29 ` Kirill A. Shutemov 2015-01-26 12:29 ` Kirill A. Shutemov 2015-01-26 14:03 ` Guenter Roeck 2015-01-26 14:03 ` Guenter Roeck 2015-01-26 14:17 ` Guenter Roeck 2015-01-26 14:17 ` Guenter Roeck 2015-01-27 16:16 ` Kirill A. Shutemov 2015-01-27 16:16 ` Kirill A. Shutemov 2015-01-27 16:16 ` Kirill A. Shutemov 2015-01-27 16:24 ` Guenter Roeck 2015-01-27 16:24 ` Guenter Roeck 2015-01-27 21:24 ` Andrew Morton 2015-01-27 21:24 ` Andrew Morton 2015-01-28 6:16 ` Guenter Roeck 2015-01-28 6:16 ` Guenter Roeck 2015-01-23 5:08 ` mmotm 2015-01-22-15-04: qemu failure due to 'mm: memcontrol: remove unnecessary soft limit tree node test' Guenter Roeck 2015-01-23 5:08 ` Guenter Roeck 2015-01-23 14:18 ` Johannes Weiner 2015-01-23 14:18 ` Johannes Weiner 2015-01-23 15:17 ` Christoph Lameter 2015-01-23 15:17 ` Christoph Lameter 2015-01-23 16:02 ` Johannes Weiner 2015-01-23 16:02 ` Johannes Weiner 2015-01-23 16:59 ` Guenter Roeck 2015-01-23 16:59 ` Guenter Roeck 2015-01-23 17:36 ` Johannes Weiner 2015-01-23 17:36 ` Johannes Weiner 2015-01-23 17:38 ` Johannes Weiner 2015-01-23 17:38 ` Johannes Weiner 2015-01-24 2:02 ` Guenter Roeck 2015-01-24 2:02 ` Guenter Roeck 2015-01-27 17:24 ` Michal Hocko 2015-01-27 17:24 ` Michal Hocko 2015-01-28 15:03 ` Christoph Lameter [this message] 2015-01-28 15:03 ` Christoph Lameter 2015-01-23 15:46 ` Guenter Roeck 2015-01-23 15:46 ` Guenter Roeck 2015-01-23 16:03 ` Johannes Weiner 2015-01-23 16:03 ` Johannes Weiner 2015-01-23 20:20 ` Christoph Lameter 2015-01-23 20:20 ` Christoph Lameter 2015-01-23 20:33 ` Guenter Roeck 2015-01-23 20:33 ` Guenter Roeck 2015-01-23 21:09 ` Christoph Lameter 2015-01-23 21:09 ` Christoph Lameter 2015-01-24 7:16 ` Johannes Weiner 2015-01-24 7:16 ` Johannes Weiner 2015-01-25 21:36 ` Valdis.Kletnieks 2015-01-26 13:37 ` Johannes Weiner 2015-01-26 13:37 ` 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=alpine.DEB.2.11.1501280900000.31753@gentwo.org \ --to=cl@linux.com \ --cc=akpm@linux-foundation.org \ --cc=hannes@cmpxchg.org \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=linux-next@vger.kernel.org \ --cc=linux@roeck-us.net \ --cc=mhocko@suse.cz \ --cc=mm-commits@vger.kernel.org \ --cc=sfr@canb.auug.org.au \ /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.