From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Kemeng Shi <shikemeng@huaweicloud.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org
Cc: mgorman@techsingularity.net, willy@infradead.org, david@redhat.com
Subject: Re: [PATCH 3/5] mm/compaction: merge end_pfn boundary check in isolate_freepages_range
Date: Wed, 2 Aug 2023 10:56:19 +0800 [thread overview]
Message-ID: <b678358f-0834-c01a-c021-7f719faf6fc1@linux.alibaba.com> (raw)
In-Reply-To: <20230729174354.2239980-4-shikemeng@huaweicloud.com>
On 7/30/2023 1:43 AM, Kemeng Shi wrote:
> From: Kemeng Shi <shikemeng@huawei.com>
>
> Merge the end_pfn boundary check for single page block forward and multiple
> page blocks forward to avoid do twice boundary check for multiple page
> blocks forward.
>
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
LGTM.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> ---
> mm/compaction.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index 4a784872565a..65791a74c5e8 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -740,8 +740,6 @@ isolate_freepages_range(struct compact_control *cc,
> /* Protect pfn from changing by isolate_freepages_block */
> unsigned long isolate_start_pfn = pfn;
>
> - block_end_pfn = min(block_end_pfn, end_pfn);
> -
> /*
> * pfn could pass the block_end_pfn if isolated freepage
> * is more than pageblock order. In this case, we adjust
> @@ -750,9 +748,10 @@ isolate_freepages_range(struct compact_control *cc,
> if (pfn >= block_end_pfn) {
> block_start_pfn = pageblock_start_pfn(pfn);
> block_end_pfn = pageblock_end_pfn(pfn);
> - block_end_pfn = min(block_end_pfn, end_pfn);
> }
>
> + block_end_pfn = min(block_end_pfn, end_pfn);
> +
> if (!pageblock_pfn_to_page(block_start_pfn,
> block_end_pfn, cc->zone))
> break;
next prev parent reply other threads:[~2023-08-02 2:56 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
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 ` Baolin Wang [this message]
[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=b678358f-0834-c01a-c021-7f719faf6fc1@linux.alibaba.com \
--to=baolin.wang@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--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