提交 82a2481e 编写于 作者: A Anshuman Khandual 提交者: Linus Torvalds

mm/memory-failure.c: add page flag description in error paths

It helps to provide page flag description along with the raw value in
error paths during soft offline process.  From sample experiments

Before the patch:

  soft offline: 0x6100: migration failed 1, type 3ffff800008018
  soft offline: 0x7400: migration failed 1, type 3ffff800008018

After the patch:

  soft offline: 0x5900: migration failed 1, type 3ffff800008018 (uptodate|dirty|head)
  soft offline: 0x6c00: migration failed 1, type 3ffff800008018 (uptodate|dirty|head)

Link: http://lkml.kernel.org/r/20170409023829.10788-1-khandual@linux.vnet.ibm.comSigned-off-by: NAnshuman Khandual <khandual@linux.vnet.ibm.com>
Acked-by: NNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 5e451be7
...@@ -1541,8 +1541,8 @@ static int get_any_page(struct page *page, unsigned long pfn, int flags) ...@@ -1541,8 +1541,8 @@ static int get_any_page(struct page *page, unsigned long pfn, int flags)
if (ret == 1 && !PageLRU(page)) { if (ret == 1 && !PageLRU(page)) {
/* Drop page reference which is from __get_any_page() */ /* Drop page reference which is from __get_any_page() */
put_hwpoison_page(page); put_hwpoison_page(page);
pr_info("soft_offline: %#lx: unknown non LRU page type %lx\n", pr_info("soft_offline: %#lx: unknown non LRU page type %lx (%pGp)\n",
pfn, page->flags); pfn, page->flags, &page->flags);
return -EIO; return -EIO;
} }
} }
...@@ -1583,8 +1583,8 @@ static int soft_offline_huge_page(struct page *page, int flags) ...@@ -1583,8 +1583,8 @@ static int soft_offline_huge_page(struct page *page, int flags)
ret = migrate_pages(&pagelist, new_page, NULL, MPOL_MF_MOVE_ALL, ret = migrate_pages(&pagelist, new_page, NULL, MPOL_MF_MOVE_ALL,
MIGRATE_SYNC, MR_MEMORY_FAILURE); MIGRATE_SYNC, MR_MEMORY_FAILURE);
if (ret) { if (ret) {
pr_info("soft offline: %#lx: migration failed %d, type %lx\n", pr_info("soft offline: %#lx: migration failed %d, type %lx (%pGp)\n",
pfn, ret, page->flags); pfn, ret, page->flags, &page->flags);
/* /*
* We know that soft_offline_huge_page() tries to migrate * We know that soft_offline_huge_page() tries to migrate
* only one hugepage pointed to by hpage, so we need not * only one hugepage pointed to by hpage, so we need not
...@@ -1675,14 +1675,14 @@ static int __soft_offline_page(struct page *page, int flags) ...@@ -1675,14 +1675,14 @@ static int __soft_offline_page(struct page *page, int flags)
if (!list_empty(&pagelist)) if (!list_empty(&pagelist))
putback_movable_pages(&pagelist); putback_movable_pages(&pagelist);
pr_info("soft offline: %#lx: migration failed %d, type %lx\n", pr_info("soft offline: %#lx: migration failed %d, type %lx (%pGp)\n",
pfn, ret, page->flags); pfn, ret, page->flags, &page->flags);
if (ret > 0) if (ret > 0)
ret = -EIO; ret = -EIO;
} }
} else { } else {
pr_info("soft offline: %#lx: isolation failed: %d, page count %d, type %lx\n", pr_info("soft offline: %#lx: isolation failed: %d, page count %d, type %lx (%pGp)\n",
pfn, ret, page_count(page), page->flags); pfn, ret, page_count(page), page->flags, &page->flags);
} }
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册