* [PATCH] mm/softoffline: Add page flag description in error paths
@ 2017-04-09 2:38 ` Anshuman Khandual
0 siblings, 0 replies; 4+ messages in thread
From: Anshuman Khandual @ 2017-04-09 2:38 UTC (permalink / raw)
To: linux-kernel, linux-mm; +Cc: n-horiguchi, akpm
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:
[ 132.317977] soft offline: 0x6100: migration failed 1, type 3ffff800008018
[ 132.359057] soft offline: 0x7400: migration failed 1, type 3ffff800008018
After the patch:
[ 87.694325] soft offline: 0x5900: migration failed 1, type 3ffff800008018 (uptodate|dirty|head)
[ 87.736273] soft offline: 0x6c00: migration failed 1, type 3ffff800008018 (uptodate|dirty|head)
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
mm/memory-failure.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 27f7210..fe64d77 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1543,8 +1543,8 @@ static int get_any_page(struct page *page, unsigned long pfn, int flags)
if (ret == 1 && !PageLRU(page)) {
/* Drop page reference which is from __get_any_page() */
put_hwpoison_page(page);
- pr_info("soft_offline: %#lx: unknown non LRU page type %lx\n",
- pfn, page->flags);
+ pr_info("soft_offline: %#lx: unknown non LRU page type %lx (%pGp)\n",
+ pfn, page->flags, &page->flags);
return -EIO;
}
}
@@ -1585,8 +1585,8 @@ static int soft_offline_huge_page(struct page *page, int flags)
ret = migrate_pages(&pagelist, new_page, NULL, MPOL_MF_MOVE_ALL,
MIGRATE_SYNC, MR_MEMORY_FAILURE);
if (ret) {
- pr_info("soft offline: %#lx: migration failed %d, type %lx\n",
- pfn, ret, page->flags);
+ pr_info("soft offline: %#lx: migration failed %d, type %lx (%pGp)\n",
+ pfn, ret, page->flags, &page->flags);
/*
* We know that soft_offline_huge_page() tries to migrate
* only one hugepage pointed to by hpage, so we need not
@@ -1677,14 +1677,14 @@ static int __soft_offline_page(struct page *page, int flags)
if (!list_empty(&pagelist))
putback_movable_pages(&pagelist);
- pr_info("soft offline: %#lx: migration failed %d, type %lx\n",
- pfn, ret, page->flags);
+ pr_info("soft offline: %#lx: migration failed %d, type %lx (%pGp)\n",
+ pfn, ret, page->flags, &page->flags);
if (ret > 0)
ret = -EIO;
}
} else {
- pr_info("soft offline: %#lx: isolation failed: %d, page count %d, type %lx\n",
- pfn, ret, page_count(page), page->flags);
+ pr_info("soft offline: %#lx: isolation failed: %d, page count %d, type %lx (%pGp)\n",
+ pfn, ret, page_count(page), page->flags, &page->flags);
}
return ret;
}
--
1.8.5.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] mm/softoffline: Add page flag description in error paths
@ 2017-04-09 2:38 ` Anshuman Khandual
0 siblings, 0 replies; 4+ messages in thread
From: Anshuman Khandual @ 2017-04-09 2:38 UTC (permalink / raw)
To: linux-kernel, linux-mm; +Cc: n-horiguchi, akpm
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:
[ 132.317977] soft offline: 0x6100: migration failed 1, type 3ffff800008018
[ 132.359057] soft offline: 0x7400: migration failed 1, type 3ffff800008018
After the patch:
[ 87.694325] soft offline: 0x5900: migration failed 1, type 3ffff800008018 (uptodate|dirty|head)
[ 87.736273] soft offline: 0x6c00: migration failed 1, type 3ffff800008018 (uptodate|dirty|head)
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
mm/memory-failure.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 27f7210..fe64d77 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1543,8 +1543,8 @@ static int get_any_page(struct page *page, unsigned long pfn, int flags)
if (ret == 1 && !PageLRU(page)) {
/* Drop page reference which is from __get_any_page() */
put_hwpoison_page(page);
- pr_info("soft_offline: %#lx: unknown non LRU page type %lx\n",
- pfn, page->flags);
+ pr_info("soft_offline: %#lx: unknown non LRU page type %lx (%pGp)\n",
+ pfn, page->flags, &page->flags);
return -EIO;
}
}
@@ -1585,8 +1585,8 @@ static int soft_offline_huge_page(struct page *page, int flags)
ret = migrate_pages(&pagelist, new_page, NULL, MPOL_MF_MOVE_ALL,
MIGRATE_SYNC, MR_MEMORY_FAILURE);
if (ret) {
- pr_info("soft offline: %#lx: migration failed %d, type %lx\n",
- pfn, ret, page->flags);
+ pr_info("soft offline: %#lx: migration failed %d, type %lx (%pGp)\n",
+ pfn, ret, page->flags, &page->flags);
/*
* We know that soft_offline_huge_page() tries to migrate
* only one hugepage pointed to by hpage, so we need not
@@ -1677,14 +1677,14 @@ static int __soft_offline_page(struct page *page, int flags)
if (!list_empty(&pagelist))
putback_movable_pages(&pagelist);
- pr_info("soft offline: %#lx: migration failed %d, type %lx\n",
- pfn, ret, page->flags);
+ pr_info("soft offline: %#lx: migration failed %d, type %lx (%pGp)\n",
+ pfn, ret, page->flags, &page->flags);
if (ret > 0)
ret = -EIO;
}
} else {
- pr_info("soft offline: %#lx: isolation failed: %d, page count %d, type %lx\n",
- pfn, ret, page_count(page), page->flags);
+ pr_info("soft offline: %#lx: isolation failed: %d, page count %d, type %lx (%pGp)\n",
+ pfn, ret, page_count(page), page->flags, &page->flags);
}
return ret;
}
--
1.8.5.2
--
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>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mm/softoffline: Add page flag description in error paths
2017-04-09 2:38 ` Anshuman Khandual
@ 2017-04-10 0:15 ` Naoya Horiguchi
-1 siblings, 0 replies; 4+ messages in thread
From: Naoya Horiguchi @ 2017-04-10 0:15 UTC (permalink / raw)
To: Anshuman Khandual; +Cc: linux-kernel, linux-mm, akpm
On Sun, Apr 09, 2017 at 08:08:29AM +0530, Anshuman Khandual wrote:
> 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:
>
> [ 132.317977] soft offline: 0x6100: migration failed 1, type 3ffff800008018
> [ 132.359057] soft offline: 0x7400: migration failed 1, type 3ffff800008018
>
> After the patch:
>
> [ 87.694325] soft offline: 0x5900: migration failed 1, type 3ffff800008018 (uptodate|dirty|head)
> [ 87.736273] soft offline: 0x6c00: migration failed 1, type 3ffff800008018 (uptodate|dirty|head)
>
> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Looks good to me, thank you!
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> ---
> mm/memory-failure.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 27f7210..fe64d77 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1543,8 +1543,8 @@ static int get_any_page(struct page *page, unsigned long pfn, int flags)
> if (ret == 1 && !PageLRU(page)) {
> /* Drop page reference which is from __get_any_page() */
> put_hwpoison_page(page);
> - pr_info("soft_offline: %#lx: unknown non LRU page type %lx\n",
> - pfn, page->flags);
> + pr_info("soft_offline: %#lx: unknown non LRU page type %lx (%pGp)\n",
> + pfn, page->flags, &page->flags);
> return -EIO;
> }
> }
> @@ -1585,8 +1585,8 @@ static int soft_offline_huge_page(struct page *page, int flags)
> ret = migrate_pages(&pagelist, new_page, NULL, MPOL_MF_MOVE_ALL,
> MIGRATE_SYNC, MR_MEMORY_FAILURE);
> if (ret) {
> - pr_info("soft offline: %#lx: migration failed %d, type %lx\n",
> - pfn, ret, page->flags);
> + pr_info("soft offline: %#lx: migration failed %d, type %lx (%pGp)\n",
> + pfn, ret, page->flags, &page->flags);
> /*
> * We know that soft_offline_huge_page() tries to migrate
> * only one hugepage pointed to by hpage, so we need not
> @@ -1677,14 +1677,14 @@ static int __soft_offline_page(struct page *page, int flags)
> if (!list_empty(&pagelist))
> putback_movable_pages(&pagelist);
>
> - pr_info("soft offline: %#lx: migration failed %d, type %lx\n",
> - pfn, ret, page->flags);
> + pr_info("soft offline: %#lx: migration failed %d, type %lx (%pGp)\n",
> + pfn, ret, page->flags, &page->flags);
> if (ret > 0)
> ret = -EIO;
> }
> } else {
> - pr_info("soft offline: %#lx: isolation failed: %d, page count %d, type %lx\n",
> - pfn, ret, page_count(page), page->flags);
> + pr_info("soft offline: %#lx: isolation failed: %d, page count %d, type %lx (%pGp)\n",
> + pfn, ret, page_count(page), page->flags, &page->flags);
> }
> return ret;
> }
> --
> 1.8.5.2
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm/softoffline: Add page flag description in error paths
@ 2017-04-10 0:15 ` Naoya Horiguchi
0 siblings, 0 replies; 4+ messages in thread
From: Naoya Horiguchi @ 2017-04-10 0:15 UTC (permalink / raw)
To: Anshuman Khandual; +Cc: linux-kernel, linux-mm, akpm
On Sun, Apr 09, 2017 at 08:08:29AM +0530, Anshuman Khandual wrote:
> 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:
>
> [ 132.317977] soft offline: 0x6100: migration failed 1, type 3ffff800008018
> [ 132.359057] soft offline: 0x7400: migration failed 1, type 3ffff800008018
>
> After the patch:
>
> [ 87.694325] soft offline: 0x5900: migration failed 1, type 3ffff800008018 (uptodate|dirty|head)
> [ 87.736273] soft offline: 0x6c00: migration failed 1, type 3ffff800008018 (uptodate|dirty|head)
>
> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Looks good to me, thank you!
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> ---
> mm/memory-failure.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 27f7210..fe64d77 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1543,8 +1543,8 @@ static int get_any_page(struct page *page, unsigned long pfn, int flags)
> if (ret == 1 && !PageLRU(page)) {
> /* Drop page reference which is from __get_any_page() */
> put_hwpoison_page(page);
> - pr_info("soft_offline: %#lx: unknown non LRU page type %lx\n",
> - pfn, page->flags);
> + pr_info("soft_offline: %#lx: unknown non LRU page type %lx (%pGp)\n",
> + pfn, page->flags, &page->flags);
> return -EIO;
> }
> }
> @@ -1585,8 +1585,8 @@ static int soft_offline_huge_page(struct page *page, int flags)
> ret = migrate_pages(&pagelist, new_page, NULL, MPOL_MF_MOVE_ALL,
> MIGRATE_SYNC, MR_MEMORY_FAILURE);
> if (ret) {
> - pr_info("soft offline: %#lx: migration failed %d, type %lx\n",
> - pfn, ret, page->flags);
> + pr_info("soft offline: %#lx: migration failed %d, type %lx (%pGp)\n",
> + pfn, ret, page->flags, &page->flags);
> /*
> * We know that soft_offline_huge_page() tries to migrate
> * only one hugepage pointed to by hpage, so we need not
> @@ -1677,14 +1677,14 @@ static int __soft_offline_page(struct page *page, int flags)
> if (!list_empty(&pagelist))
> putback_movable_pages(&pagelist);
>
> - pr_info("soft offline: %#lx: migration failed %d, type %lx\n",
> - pfn, ret, page->flags);
> + pr_info("soft offline: %#lx: migration failed %d, type %lx (%pGp)\n",
> + pfn, ret, page->flags, &page->flags);
> if (ret > 0)
> ret = -EIO;
> }
> } else {
> - pr_info("soft offline: %#lx: isolation failed: %d, page count %d, type %lx\n",
> - pfn, ret, page_count(page), page->flags);
> + pr_info("soft offline: %#lx: isolation failed: %d, page count %d, type %lx (%pGp)\n",
> + pfn, ret, page_count(page), page->flags, &page->flags);
> }
> return ret;
> }
> --
> 1.8.5.2
>
>
--
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-10 1:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-09 2:38 [PATCH] mm/softoffline: Add page flag description in error paths Anshuman Khandual
2017-04-09 2:38 ` Anshuman Khandual
2017-04-10 0:15 ` Naoya Horiguchi
2017-04-10 0:15 ` Naoya Horiguchi
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.