From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Kemeng Shi <shikemeng@huaweicloud.com>,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm/compaction: avoid unneeded pageblock_end_pfn when no_set_skip_hint is set
Date: Thu, 20 Jul 2023 14:09:49 +0800 [thread overview]
Message-ID: <9c6efec0-42ae-6b48-dd42-0ed7a0d5544d@linux.alibaba.com> (raw)
In-Reply-To: <20230720115351.2039431-4-shikemeng@huaweicloud.com>
On 7/20/2023 7:53 PM, Kemeng Shi wrote:
> Move pageblock_end_pfn after no_set_skip_hint check to avoid unneeded
> pageblock_end_pfn if no_set_skip_hint is set.
>
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> ---
> mm/compaction.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/compaction.c b/mm/compaction.c
> index c0d8d08fc163..9b7a0a69e19f 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -458,12 +458,12 @@ static void update_cached_migrate(struct compact_control *cc, unsigned long pfn)
> {
> struct zone *zone = cc->zone;
>
> - pfn = pageblock_end_pfn(pfn);
> -
> /* Set for isolation rather than compaction */
> if (cc->no_set_skip_hint)
> return;
>
> + pfn = pageblock_end_pfn(pfn);
> +
> if (pfn > zone->compact_cached_migrate_pfn[0])
> zone->compact_cached_migrate_pfn[0] = pfn;
> if (cc->mode != MIGRATE_ASYNC &&
next prev parent reply other threads:[~2023-07-20 6:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 11:53 [PATCH 0/2] Two minor cleanups for compaction Kemeng Shi
2023-07-20 6:08 ` Baolin Wang
2023-07-20 8:45 ` Kemeng Shi
2023-07-20 11:53 ` [PATCH 2/2] mm/compaction: avoid unneeded pageblock_end_pfn when no_set_skip_hint is set Kemeng Shi
2023-07-20 6:09 ` Baolin Wang [this message]
[not found] ` <20230720115351.2039431-2-shikemeng@huaweicloud.com>
2023-07-21 7:44 ` [PATCH 1/2] mm/compaction: correct comment of candidate pfn in fast_isolate_freepages Kemeng Shi
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=9c6efec0-42ae-6b48-dd42-0ed7a0d5544d@linux.alibaba.com \
--to=baolin.wang@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shikemeng@huaweicloud.com \
/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