From: Guenter Roeck <linux@roeck-us.net>
To: Chen Wandun <chenwandun@huawei.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, guillaume.tucker@collabora.com
Subject: Re: [PATCH] Revert "mm/page_isolation: unset migratetype directly for non Buddy page"
Date: Wed, 26 Jan 2022 13:11:54 -0800 [thread overview]
Message-ID: <20220126211154.GA3371726@roeck-us.net> (raw)
In-Reply-To: <20220117142712.3967624-1-chenwandun@huawei.com>
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
>
>
prev parent reply other threads:[~2022-01-26 21:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 14:27 [PATCH] Revert "mm/page_isolation: unset migratetype directly for non Buddy page" Chen Wandun
2022-01-17 15:32 ` David Hildenbrand
2022-01-26 2:17 ` Chen Wandun
2022-01-18 13:50 ` Dong Aisheng
2022-01-24 8:41 ` Francesco Dolcini
2022-01-25 16:40 ` Vlastimil Babka
2022-01-26 2:18 ` Chen Wandun
2022-01-30 9:24 ` Thorsten Leemhuis
2022-01-31 22:39 ` Andrew Morton
2022-02-05 5:15 ` Thorsten Leemhuis
2022-01-26 21:11 ` Guenter Roeck [this message]
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=20220126211154.GA3371726@roeck-us.net \
--to=linux@roeck-us.net \
--cc=akpm@linux-foundation.org \
--cc=chenwandun@huawei.com \
--cc=guillaume.tucker@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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.