mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: vbabka@suse.cz, linux@roeck-us.net,
	francesco.dolcini@toradex.com, david@redhat.com,
	bot@kernelci.org, aisheng.dong@nxp.com, chenwandun@huawei.com,
	akpm@linux-foundation.org, linux-mm@kvack.org,
	mm-commits@vger.kernel.org, torvalds@linux-foundation.org,
	akpm@linux-foundation.org
Subject: [patch 01/10] Revert "mm/page_isolation: unset migratetype directly for non Buddy page"
Date: Thu, 03 Feb 2022 20:49:06 -0800	[thread overview]
Message-ID: <20220204044907.2B976C004E1@smtp.kernel.org> (raw)
In-Reply-To: <20220203204836.88dcebe504f440686cc63a60@linux-foundation.org>

From: Chen Wandun <chenwandun@huawei.com>
Subject: Revert "mm/page_isolation: unset migratetype directly for non Buddy page"

This reverts commit 721fb891ad0b3956d5c168b2931e3e5e4fb7ca40.

commit 721fb891ad0b ("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.

Link: https://lkml.kernel.org/r/20220126024436.13921-1-chenwandun@huawei.com
Fixes: 721fb891ad0b ("mm/page_isolation: unset migratetype directly for non Buddy page")
Signed-off-by: Chen Wandun <chenwandun@huawei.com>
Reported-by: "kernelci.org bot" <bot@kernelci.org>
Acked-by: David Hildenbrand <david@redhat.com>
Tested-by: Dong Aisheng <aisheng.dong@nxp.com>
Tested-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page_isolation.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/page_isolation.c~revert-mm-page_isolation-unset-migratetype-directly-for-non-buddy-page
+++ a/mm/page_isolation.c
@@ -115,7 +115,7 @@ static void unset_migratetype_isolate(st
 	 * 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);
 	}
_

  reply	other threads:[~2022-02-04  4:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-04  4:48 incoming Andrew Morton
2022-02-04  4:49 ` Andrew Morton [this message]
2022-02-04  4:49 ` [patch 02/10] mm/debug_vm_pgtable: remove pte entry from the page table Andrew Morton
2022-02-04  4:49 ` [patch 03/10] mm/page_table_check: use unsigned long for page counters and cleanup Andrew Morton
2022-02-04  4:49 ` [patch 04/10] mm/khugepaged: unify collapse pmd clear, flush and free Andrew Morton
2022-02-04  4:49 ` [patch 05/10] mm/page_table_check: check entries at pmd levels Andrew Morton
2022-02-04  4:49 ` [patch 06/10] mm/pgtable: define pte_index so that preprocessor could recognize it Andrew Morton
2022-02-04  4:49 ` [patch 07/10] ipc/sem: do not sleep with a spin lock held Andrew Morton
2022-02-04  4:49 ` [patch 08/10] mm/kmemleak: avoid scanning potential huge holes Andrew Morton
2022-02-04  4:49 ` [patch 09/10] MAINTAINERS: update rppt's email Andrew Morton
2022-02-04  4:49 ` [patch 10/10] kselftest/vm: revert "tools/testing/selftests/vm/userfaultfd.c: use swap() to make code cleaner" Andrew Morton
2022-02-04 17:56 ` [patch 01/10] Revert "mm/page_isolation: unset migratetype directly for non Buddy page" Andrew Morton
2022-02-04 17:56 ` [patch 02/10] mm/debug_vm_pgtable: remove pte entry from the page table Andrew Morton
2022-02-04 17:56 ` [patch 03/10] mm/page_table_check: use unsigned long for page counters and cleanup Andrew Morton
2022-02-04 17:56 ` [patch 04/10] mm/khugepaged: unify collapse pmd clear, flush and free Andrew Morton
2022-02-04 17:56 ` [patch 05/10] mm/page_table_check: check entries at pmd levels Andrew Morton
2022-02-04 17:57 ` [patch 06/10] mm/pgtable: define pte_index so that preprocessor could recognize it Andrew Morton
2022-02-04 17:57 ` [patch 07/10] ipc/sem: do not sleep with a spin lock held Andrew Morton
2022-02-04 17:57 ` [patch 08/10] mm/kmemleak: avoid scanning potential huge holes Andrew Morton
2022-02-04 17:57 ` [patch 09/10] MAINTAINERS: update rppt's email Andrew Morton
2022-02-04 17:57 ` [patch 10/10] kselftest/vm: revert "tools/testing/selftests/vm/userfaultfd.c: use swap() to make code cleaner" Andrew Morton

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=20220204044907.2B976C004E1@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=aisheng.dong@nxp.com \
    --cc=bot@kernelci.org \
    --cc=chenwandun@huawei.com \
    --cc=david@redhat.com \
    --cc=francesco.dolcini@toradex.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@roeck-us.net \
    --cc=mm-commits@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vbabka@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).