lkml.org 
[lkml]   [2022]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Revert "mm/page_isolation: unset migratetype directly for non Buddy page"
On Mon, Jan 17, 2022 at 10:27:12PM +0800, Chen Wandun wrote:
> This reverts commit 075782149abff45ee22f27315eced44d02b96779.
>
> commit 075782149abf ("mm/page_isolation: unset migratetype directly for
> non Buddy page") will result memory that should in buddy disappear by
> mistake. move_freepages_block move all pages in pageblock instead of
> pages indicated by input parameter, so if input pages is not in buddy
> but other pages in pageblock is in buddy, it will result in page out of
> control.
>
> Reported-by: "kernelci.org bot" <bot@kernelci.org>
> Signed-off-by: Chen Wandun <chenwandun@huawei.com>

I see a number of qemu emulations fail with memory allocation
errors in v5.17-rc1. This revert fixes the problem.

Tested-by: Guenter Roeck <linux@roeck-us.net>

Guenter

> ---
> mm/page_isolation.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/page_isolation.c b/mm/page_isolation.c
> index 6a0ddda6b3c5..f67c4c70f17f 100644
> --- a/mm/page_isolation.c
> +++ b/mm/page_isolation.c
> @@ -115,7 +115,7 @@ static void unset_migratetype_isolate(struct page *page, unsigned migratetype)
> * onlining - just onlined memory won't immediately be considered for
> * allocation.
> */
> - if (!isolated_page && PageBuddy(page)) {
> + if (!isolated_page) {
> nr_pages = move_freepages_block(zone, page, migratetype, NULL);
> __mod_zone_freepage_state(zone, nr_pages, migratetype);
> }
> --
> 2.18.0.huawei.25
>
>

\
 
 \ /
  Last update: 2022-01-26 22:12    [W:1.025 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site