All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: 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,
	sfr@canb.auug.org.au, mhocko@suse.cz, cl@linux.com
Subject: Re: mmotm 2015-01-22-15-04: qemu failure due to 'mm: memcontrol: remove unnecessary soft limit tree node test'
Date: Fri, 23 Jan 2015 07:46:43 -0800	[thread overview]
Message-ID: <54C26CE3.2060001@roeck-us.net> (raw)
In-Reply-To: <20150123141817.GA22926@phnom.home.cmpxchg.org>

On 01/23/2015 06:18 AM, Johannes Weiner wrote:
> Hi Guenter,
>
> CC'ing Christoph for slub-stuff:
>
> On Thu, Jan 22, 2015 at 09:08:02PM -0800, Guenter Roeck wrote:
>> On Thu, Jan 22, 2015 at 03:05:17PM -0800, akpm@linux-foundation.org wrote:
>>> The mm-of-the-moment snapshot 2015-01-22-15-04 has been uploaded to
>>>
>>>     http://www.ozlabs.org/~akpm/mmotm/
>>>
>> qemu test for ppc64 fails with
>>
>> Unable to handle kernel paging request for data at address 0x0000af50
>> Faulting instruction address: 0xc00000000089d5d4
>> Oops: Kernel access of bad area, sig: 11 [#1]
>>
>> with the following call stack:
>>
>> Call Trace:
>> [c00000003d32f920] [c00000000089d588] .__slab_alloc.isra.44+0x7c/0x6f4
>> (unreliable)
>> [c00000003d32fa90] [c00000000020cf8c] .kmem_cache_alloc_node_trace+0x12c/0x3b0
>> [c00000003d32fb60] [c000000000bceeb4] .mem_cgroup_init+0x128/0x1b0
>> [c00000003d32fbf0] [c00000000000a2b4] .do_one_initcall+0xd4/0x260
>> [c00000003d32fce0] [c000000000ba26a8] .kernel_init_freeable+0x244/0x32c
>> [c00000003d32fdb0] [c00000000000ac24] .kernel_init+0x24/0x140
>> [c00000003d32fe30] [c000000000009564] .ret_from_kernel_thread+0x58/0x74
>>
>> bisect log:
>
> [...]
>
>> # first bad commit: [a40d0d2cf21e2714e9a6c842085148c938bf36ab] mm: memcontrol: remove unnecessary soft limit tree node test
>
> The change in question is this:
>
>      mm: memcontrol: remove unnecessary soft limit tree node test
>
>      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>
>      Reviewed-by: Vladimir Davydov <vdavydov@parallels.com>
>      Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index fb9788af4a3e..10db4a654d68 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -4539,13 +4539,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;
>
> --
>
> Is the assumption of this patch wrong?  Does the specified node have
> to be online for the fallback to work?
>

I added some debugging. First, the problem is only seen with SMP disabled.
Second, there is only one online node.

Without your patch:

Node 0 online 1 high 1 memory 1 cpu 0 normal 1 tmp 0 rtpn c00000003d240600
Node 1 online 0 high 0 memory 0 cpu 0 normal 0 tmp -1 rtpn c00000003d240640
Node 2 online 0 high 0 memory 0 cpu 0 normal 0 tmp -1 rtpn c00000003d240680

[ and so on up to node 255 ]

With your patch:

Node 0 online 1 high 1 memory 1 cpu 0 normal 1 rtpn c00000003d240600
Unable to handle kernel paging request for data at address 0x0000af50
Faulting instruction address: 0xc000000000895a3c
Oops: Kernel access of bad area, sig: 11 [#1]

The log message is after the call to kzalloc_node.

So it doesn't look like the fallback is working, at least not with ppc64
in non-SMP mode.

Guenter


WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <linux@roeck-us.net>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: 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,
	sfr@canb.auug.org.au, mhocko@suse.cz, cl@linux.com
Subject: Re: mmotm 2015-01-22-15-04: qemu failure due to 'mm: memcontrol: remove unnecessary soft limit tree node test'
Date: Fri, 23 Jan 2015 07:46:43 -0800	[thread overview]
Message-ID: <54C26CE3.2060001@roeck-us.net> (raw)
In-Reply-To: <20150123141817.GA22926@phnom.home.cmpxchg.org>

On 01/23/2015 06:18 AM, Johannes Weiner wrote:
> Hi Guenter,
>
> CC'ing Christoph for slub-stuff:
>
> On Thu, Jan 22, 2015 at 09:08:02PM -0800, Guenter Roeck wrote:
>> On Thu, Jan 22, 2015 at 03:05:17PM -0800, akpm@linux-foundation.org wrote:
>>> The mm-of-the-moment snapshot 2015-01-22-15-04 has been uploaded to
>>>
>>>     http://www.ozlabs.org/~akpm/mmotm/
>>>
>> qemu test for ppc64 fails with
>>
>> Unable to handle kernel paging request for data at address 0x0000af50
>> Faulting instruction address: 0xc00000000089d5d4
>> Oops: Kernel access of bad area, sig: 11 [#1]
>>
>> with the following call stack:
>>
>> Call Trace:
>> [c00000003d32f920] [c00000000089d588] .__slab_alloc.isra.44+0x7c/0x6f4
>> (unreliable)
>> [c00000003d32fa90] [c00000000020cf8c] .kmem_cache_alloc_node_trace+0x12c/0x3b0
>> [c00000003d32fb60] [c000000000bceeb4] .mem_cgroup_init+0x128/0x1b0
>> [c00000003d32fbf0] [c00000000000a2b4] .do_one_initcall+0xd4/0x260
>> [c00000003d32fce0] [c000000000ba26a8] .kernel_init_freeable+0x244/0x32c
>> [c00000003d32fdb0] [c00000000000ac24] .kernel_init+0x24/0x140
>> [c00000003d32fe30] [c000000000009564] .ret_from_kernel_thread+0x58/0x74
>>
>> bisect log:
>
> [...]
>
>> # first bad commit: [a40d0d2cf21e2714e9a6c842085148c938bf36ab] mm: memcontrol: remove unnecessary soft limit tree node test
>
> The change in question is this:
>
>      mm: memcontrol: remove unnecessary soft limit tree node test
>
>      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>
>      Reviewed-by: Vladimir Davydov <vdavydov@parallels.com>
>      Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index fb9788af4a3e..10db4a654d68 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -4539,13 +4539,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;
>
> --
>
> Is the assumption of this patch wrong?  Does the specified node have
> to be online for the fallback to work?
>

I added some debugging. First, the problem is only seen with SMP disabled.
Second, there is only one online node.

Without your patch:

Node 0 online 1 high 1 memory 1 cpu 0 normal 1 tmp 0 rtpn c00000003d240600
Node 1 online 0 high 0 memory 0 cpu 0 normal 0 tmp -1 rtpn c00000003d240640
Node 2 online 0 high 0 memory 0 cpu 0 normal 0 tmp -1 rtpn c00000003d240680

[ and so on up to node 255 ]

With your patch:

Node 0 online 1 high 1 memory 1 cpu 0 normal 1 rtpn c00000003d240600
Unable to handle kernel paging request for data at address 0x0000af50
Faulting instruction address: 0xc000000000895a3c
Oops: Kernel access of bad area, sig: 11 [#1]

The log message is after the call to kzalloc_node.

So it doesn't look like the fallback is working, at least not with ppc64
in non-SMP mode.

Guenter

--
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>

  parent reply	other threads:[~2015-01-23 15:47 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
2015-01-28 15:03           ` Christoph Lameter
2015-01-23 15:46     ` Guenter Roeck [this message]
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=54C26CE3.2060001@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --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=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: link
Be 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.