* [PATCH] mm: fix a wrong flag in set_migratetype_isolate()
@ 2019-03-13 21:25 Qian Cai
2019-03-14 6:27 ` Michal Hocko
2019-03-14 7:55 ` Oscar Salvador
0 siblings, 2 replies; 3+ messages in thread
From: Qian Cai @ 2019-03-13 21:25 UTC (permalink / raw)
To: akpm; +Cc: mhocko, osalvador, linux-mm, linux-kernel, Qian Cai
Due to has_unmovable_pages() takes an incorrect irqsave flag instead of
the isolation flag in set_migratetype_isolate(), it causes issues with
HWPOSION and error reporting where dump_page() is not called when there
is an unmoveable page.
Fixes: d381c54760dc ("mm: only report isolation failures when offlining memory")
Signed-off-by: Qian Cai <cai@lca.pw>
---
mm/page_isolation.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index bf67b63227ca..0f5c92fdc7f1 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -59,7 +59,8 @@ static int set_migratetype_isolate(struct page *page, int migratetype, int isol_
* FIXME: Now, memory hotplug doesn't call shrink_slab() by itself.
* We just check MOVABLE pages.
*/
- if (!has_unmovable_pages(zone, page, arg.pages_found, migratetype, flags))
+ if (!has_unmovable_pages(zone, page, arg.pages_found, migratetype,
+ isol_flags))
ret = 0;
/*
--
2.17.2 (Apple Git-113)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: fix a wrong flag in set_migratetype_isolate()
2019-03-13 21:25 [PATCH] mm: fix a wrong flag in set_migratetype_isolate() Qian Cai
@ 2019-03-14 6:27 ` Michal Hocko
2019-03-14 7:55 ` Oscar Salvador
1 sibling, 0 replies; 3+ messages in thread
From: Michal Hocko @ 2019-03-14 6:27 UTC (permalink / raw)
To: Qian Cai; +Cc: akpm, osalvador, linux-mm, linux-kernel
On Wed 13-03-19 17:25:07, Qian Cai wrote:
> Due to has_unmovable_pages() takes an incorrect irqsave flag instead of
> the isolation flag in set_migratetype_isolate(), it causes issues with
> HWPOSION and error reporting where dump_page() is not called when there
> is an unmoveable page.
>
> Fixes: d381c54760dc ("mm: only report isolation failures when offlining memory")
Cc: stable # 5.0
> Signed-off-by: Qian Cai <cai@lca.pw>
Very well spotted!
Acked-by: Michal Hocko <mhocko@suse.com>
> ---
> mm/page_isolation.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/mm/page_isolation.c b/mm/page_isolation.c
> index bf67b63227ca..0f5c92fdc7f1 100644
> --- a/mm/page_isolation.c
> +++ b/mm/page_isolation.c
> @@ -59,7 +59,8 @@ static int set_migratetype_isolate(struct page *page, int migratetype, int isol_
> * FIXME: Now, memory hotplug doesn't call shrink_slab() by itself.
> * We just check MOVABLE pages.
> */
> - if (!has_unmovable_pages(zone, page, arg.pages_found, migratetype, flags))
> + if (!has_unmovable_pages(zone, page, arg.pages_found, migratetype,
> + isol_flags))
> ret = 0;
>
> /*
> --
> 2.17.2 (Apple Git-113)
--
Michal Hocko
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: fix a wrong flag in set_migratetype_isolate()
2019-03-13 21:25 [PATCH] mm: fix a wrong flag in set_migratetype_isolate() Qian Cai
2019-03-14 6:27 ` Michal Hocko
@ 2019-03-14 7:55 ` Oscar Salvador
1 sibling, 0 replies; 3+ messages in thread
From: Oscar Salvador @ 2019-03-14 7:55 UTC (permalink / raw)
To: Qian Cai; +Cc: akpm, mhocko, linux-mm, linux-kernel
On Wed, Mar 13, 2019 at 05:25:07PM -0400, Qian Cai wrote:
> Due to has_unmovable_pages() takes an incorrect irqsave flag instead of
> the isolation flag in set_migratetype_isolate(), it causes issues with
> HWPOSION and error reporting where dump_page() is not called when there
> is an unmoveable page.
>
> Fixes: d381c54760dc ("mm: only report isolation failures when offlining memory")
> Signed-off-by: Qian Cai <cai@lca.pw>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
> ---
> mm/page_isolation.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/mm/page_isolation.c b/mm/page_isolation.c
> index bf67b63227ca..0f5c92fdc7f1 100644
> --- a/mm/page_isolation.c
> +++ b/mm/page_isolation.c
> @@ -59,7 +59,8 @@ static int set_migratetype_isolate(struct page *page, int migratetype, int isol_
> * FIXME: Now, memory hotplug doesn't call shrink_slab() by itself.
> * We just check MOVABLE pages.
> */
> - if (!has_unmovable_pages(zone, page, arg.pages_found, migratetype, flags))
> + if (!has_unmovable_pages(zone, page, arg.pages_found, migratetype,
> + isol_flags))
> ret = 0;
>
> /*
> --
> 2.17.2 (Apple Git-113)
>
--
Oscar Salvador
SUSE L3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-14 7:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-13 21:25 [PATCH] mm: fix a wrong flag in set_migratetype_isolate() Qian Cai
2019-03-14 6:27 ` Michal Hocko
2019-03-14 7:55 ` Oscar Salvador
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.