linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	baolin.wang@linux.alibaba.com, mgorman@techsingularity.net,
	willy@infradead.org, david@redhat.com
Subject: Re: [PATCH 1/5] mm/compaction: allow blockpfn outside of pageblock for high order buddy page
Date: Tue, 1 Aug 2023 12:12:03 -0700	[thread overview]
Message-ID: <20230801121203.a58e15d4f290721746340801@linux-foundation.org> (raw)
In-Reply-To: <20230729174354.2239980-2-shikemeng@huaweicloud.com>

On Sun, 30 Jul 2023 01:43:50 +0800 Kemeng Shi <shikemeng@huaweicloud.com> wrote:

> Commit 9fcd6d2e052ee ("mm, compaction: skip compound pages by order in
> free scanner") skiped compound pages to save iterations and limit blockpfn
> to reach outside of page block in case of bogus compound_order. While this
> also limit pfnblock outside page block in case a buddy page with order
> higher than page block is found. After this, isolate_freepages_range will
> fail unexpectedly as it will fail to isolate the page block which was
> isolated successfully by high order buddy page in previous page block
> and abort the free page isolation.
> 
> Fix this by allow blockpfn outside of pageblock in case of high order
> buddy page.
> 
> ...
>
> @@ -1418,7 +1420,7 @@ fast_isolate_around(struct compact_control *cc, unsigned long pfn)
>  	isolate_freepages_block(cc, &start_pfn, end_pfn, &cc->freepages, 1, false);
>  
>  	/* Skip this pageblock in the future as it's full or nearly full */
> -	if (start_pfn == end_pfn && !cc->no_set_skip_hint)
> +	if (start_pfn >= end_pfn && !cc->no_set_skip_hint)
>  		set_pageblock_skip(page);
>  }
>  

This needed alteration for mm-unstable changes:

@@ -1441,7 +1443,7 @@ fast_isolate_around(struct compact_contr
 	isolate_freepages_block(cc, &start_pfn, end_pfn, &cc->freepages, 1, false);
 
 	/* Skip this pageblock in the future as it's full or nearly full */
-	if (start_pfn == end_pfn)
+	if (start_pfn >= end_pfn)
 		set_pageblock_skip(page);
 
 	return;



  reply	other threads:[~2023-08-01 19:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-29 17:43 [PATCH 0/5] Fixes and cleanups to compaction Kemeng Shi
2023-07-29 17:43 ` [PATCH 1/5] mm/compaction: allow blockpfn outside of pageblock for high order buddy page Kemeng Shi
2023-08-01 19:12   ` Andrew Morton [this message]
2023-08-02  1:57   ` Baolin Wang
2023-08-02  6:01     ` Kemeng Shi
2023-07-29 17:43 ` [PATCH 4/5] mm/compaction: remove unnecessary cursor page in isolate_freepages_block Kemeng Shi
2023-08-02  2:59   ` Baolin Wang
     [not found] ` <20230729174354.2239980-3-shikemeng@huaweicloud.com>
2023-08-02  2:32   ` [PATCH 2/5] mm/compaction: set compact_cached_free_pfn correctly in update_pageblock_skip Baolin Wang
     [not found] ` <20230729174354.2239980-4-shikemeng@huaweicloud.com>
2023-08-02  2:56   ` [PATCH 3/5] mm/compaction: merge end_pfn boundary check in isolate_freepages_range Baolin Wang
     [not found] ` <20230729174354.2239980-6-shikemeng@huaweicloud.com>
2023-08-02  3:00   ` [PATCH 5/5] mm/compaction: remove unnecessary "else continue" at end of loop in isolate_freepages_block Baolin Wang

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=20230801121203.a58e15d4f290721746340801@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=shikemeng@huaweicloud.com \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox