From: Michael Ellerman <mpe@ellerman.id.au>
To: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Hugh Dickins <hughd@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
benh@kernel.crashing.org, Tony Luck <tony.luck@intel.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
trinity@vger.kernel.org
Subject: Re: [PATCH] hugetlb: restrict hugepage_migration_support() to x86_64 (Re: BUG at mm/memory.c:1489!)
Date: Fri, 30 May 2014 11:35:16 +1000 [thread overview]
Message-ID: <1401413716.29324.2.camel@concordia> (raw)
In-Reply-To: <1401388474-mqnis5cp@n-horiguchi@ah.jp.nec.com>
On Thu, 2014-05-29 at 14:34 -0400, Naoya Horiguchi wrote:
> On Thu, May 29, 2014 at 06:59:43PM +1000, Michael Ellerman wrote:
> > Applying your patch and running trinity pretty immediately results in the
> > following, which looks related (sys_move_pages() again) ?
> >
> > Unable to handle kernel paging request for data at address 0xf2000f80000000
> > Faulting instruction address: 0xc0000000001e29bc
> > cpu 0x1b: Vector: 300 (Data Access) at [c0000003c70f76f0]
> > pc: c0000000001e29bc: .remove_migration_pte+0x9c/0x320
> > lr: c0000000001e29b8: .remove_migration_pte+0x98/0x320
> > sp: c0000003c70f7970
> > msr: 8000000000009032
> > dar: f2000f80000000
> > dsisr: 40000000
> > current = 0xc0000003f9045800
> > paca = 0xc000000001dc6c00 softe: 0 irq_happened: 0x01
> > pid = 3585, comm = trinity-c27
> > enter ? for help
> > [c0000003c70f7a20] c0000000001bce88 .rmap_walk+0x328/0x470
> > [c0000003c70f7ae0] c0000000001e2904 .remove_migration_ptes+0x44/0x60
> > [c0000003c70f7b80] c0000000001e4ce8 .migrate_pages+0x6d8/0xa00
> > [c0000003c70f7cc0] c0000000001e55ec .SyS_move_pages+0x5dc/0x7d0
> > [c0000003c70f7e30] c00000000000a1d8 syscall_exit+0x0/0x98
> > --- Exception: c01 (System Call) at 00003fff7b2b30a8
> > SP (3fffe09728a0) is in userspace
> > 1b:mon>
>
> Sorry for inconvenience on your testing.
That's fine, it's good to find bugs :)
> Hugepage migration is enabled for archs which have pmd-level hugepage
> (including ppc64,) but not tested except for x86_64.
> hugepage_migration_support() controls this so the following patch should
> help you avoid the problem, I believe.
> Could you try to test with it?
Sure. So this patch, in addition to Hugh's patch to remove the BUG_ON(), does
avoid the crash above (remove_migration_pte()).
I dropped Hugh's patch, as he has decided he doesn't like it, and added the
following hunk instead:
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 3c1b968..f230a97 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -175,6 +175,12 @@ static inline int vma_migratable(struct vm_area_struct *vma)
{
if (vma->vm_flags & (VM_IO | VM_PFNMAP))
return 0;
+
+#ifndef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
+ if (vma->vm_flags & VM_HUGETLB)
+ return 0;
+#endif
+
/*
* Migration allocates pages in the highest zone. If we cannot
* do so then migration (at least from node to node) is not
Which seems to be what Hugh was referring to in his mail - correct me if I'm
wrong Hugh.
With your patch and the above hunk I can run trinity happily for a while,
whereas without it crashes almost immediately.
So with the above hunk you can add my tested-by.
cheers
WARNING: multiple messages have this Message-ID (diff)
From: Michael Ellerman <mpe@ellerman.id.au>
To: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Hugh Dickins <hughd@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
benh@kernel.crashing.org, Tony Luck <tony.luck@intel.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
trinity@vger.kernel.org
Subject: Re: [PATCH] hugetlb: restrict hugepage_migration_support() to x86_64 (Re: BUG at mm/memory.c:1489!)
Date: Fri, 30 May 2014 11:35:16 +1000 [thread overview]
Message-ID: <1401413716.29324.2.camel@concordia> (raw)
In-Reply-To: <1401388474-mqnis5cp@n-horiguchi@ah.jp.nec.com>
On Thu, 2014-05-29 at 14:34 -0400, Naoya Horiguchi wrote:
> On Thu, May 29, 2014 at 06:59:43PM +1000, Michael Ellerman wrote:
> > Applying your patch and running trinity pretty immediately results in the
> > following, which looks related (sys_move_pages() again) ?
> >
> > Unable to handle kernel paging request for data at address 0xf2000f80000000
> > Faulting instruction address: 0xc0000000001e29bc
> > cpu 0x1b: Vector: 300 (Data Access) at [c0000003c70f76f0]
> > pc: c0000000001e29bc: .remove_migration_pte+0x9c/0x320
> > lr: c0000000001e29b8: .remove_migration_pte+0x98/0x320
> > sp: c0000003c70f7970
> > msr: 8000000000009032
> > dar: f2000f80000000
> > dsisr: 40000000
> > current = 0xc0000003f9045800
> > paca = 0xc000000001dc6c00 softe: 0 irq_happened: 0x01
> > pid = 3585, comm = trinity-c27
> > enter ? for help
> > [c0000003c70f7a20] c0000000001bce88 .rmap_walk+0x328/0x470
> > [c0000003c70f7ae0] c0000000001e2904 .remove_migration_ptes+0x44/0x60
> > [c0000003c70f7b80] c0000000001e4ce8 .migrate_pages+0x6d8/0xa00
> > [c0000003c70f7cc0] c0000000001e55ec .SyS_move_pages+0x5dc/0x7d0
> > [c0000003c70f7e30] c00000000000a1d8 syscall_exit+0x0/0x98
> > --- Exception: c01 (System Call) at 00003fff7b2b30a8
> > SP (3fffe09728a0) is in userspace
> > 1b:mon>
>
> Sorry for inconvenience on your testing.
That's fine, it's good to find bugs :)
> Hugepage migration is enabled for archs which have pmd-level hugepage
> (including ppc64,) but not tested except for x86_64.
> hugepage_migration_support() controls this so the following patch should
> help you avoid the problem, I believe.
> Could you try to test with it?
Sure. So this patch, in addition to Hugh's patch to remove the BUG_ON(), does
avoid the crash above (remove_migration_pte()).
I dropped Hugh's patch, as he has decided he doesn't like it, and added the
following hunk instead:
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h
index 3c1b968..f230a97 100644
--- a/include/linux/mempolicy.h
+++ b/include/linux/mempolicy.h
@@ -175,6 +175,12 @@ static inline int vma_migratable(struct vm_area_struct *vma)
{
if (vma->vm_flags & (VM_IO | VM_PFNMAP))
return 0;
+
+#ifndef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
+ if (vma->vm_flags & VM_HUGETLB)
+ return 0;
+#endif
+
/*
* Migration allocates pages in the highest zone. If we cannot
* do so then migration (at least from node to node) is not
Which seems to be what Hugh was referring to in his mail - correct me if I'm
wrong Hugh.
With your patch and the above hunk I can run trinity happily for a while,
whereas without it crashes almost immediately.
So with the above hunk you can add my tested-by.
cheers
--
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:[~2014-05-30 1:35 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-28 8:32 BUG at mm/memory.c:1489! Michael Ellerman
2014-05-28 8:32 ` Michael Ellerman
2014-05-29 0:33 ` Hugh Dickins
2014-05-29 0:33 ` Hugh Dickins
2014-05-29 4:52 ` Naoya Horiguchi
2014-05-29 20:50 ` Hugh Dickins
2014-05-29 20:50 ` Hugh Dickins
2014-05-29 8:59 ` Michael Ellerman
2014-05-29 8:59 ` Michael Ellerman
2014-05-29 18:34 ` [PATCH] hugetlb: restrict hugepage_migration_support() to x86_64 (Re: BUG at mm/memory.c:1489!) Naoya Horiguchi
2014-05-29 22:04 ` Hugh Dickins
2014-05-29 22:04 ` Hugh Dickins
2014-05-30 2:56 ` Naoya Horiguchi
2014-05-29 21:03 ` BUG at mm/memory.c:1489! Hugh Dickins
2014-05-29 21:03 ` Hugh Dickins
[not found] ` <1401388474-mqnis5cp@n-horiguchi@ah.jp.nec.com>
2014-05-30 1:35 ` Michael Ellerman [this message]
2014-05-30 1:35 ` [PATCH] hugetlb: restrict hugepage_migration_support() to x86_64 (Re: BUG at mm/memory.c:1489!) Michael Ellerman
2014-05-30 1:52 ` Hugh Dickins
2014-05-30 1:52 ` Hugh Dickins
2014-05-30 3:04 ` Naoya Horiguchi
2014-05-30 4:13 ` [PATCH 1/2] hugetlb: restrict hugepage_migration_support() to x86_64 Naoya Horiguchi
2014-05-30 4:13 ` Naoya Horiguchi
2014-05-30 12:00 ` Hugh Dickins
2014-05-30 12:00 ` Hugh Dickins
2014-05-30 4:13 ` [PATCH 2/2] hugetlb: rename hugepage_migration_support() to ..._supported() Naoya Horiguchi
2014-05-30 4:13 ` Naoya Horiguchi
2014-05-30 12:02 ` Hugh Dickins
2014-05-30 12:02 ` Hugh Dickins
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=1401413716.29324.2.camel@concordia \
--to=mpe@ellerman.id.au \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=tony.luck@intel.com \
--cc=trinity@vger.kernel.org \
/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.