From: Oscar Salvador <osalvador@suse.de>
To: Chen Wandun <chenwandun@huawei.com>
Cc: akpm@linux-foundation.org, vbabka@suse.cz,
iamjoonsoo.kim@lge.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, wangkefeng.wang@huawei.com
Subject: Re: [PATCH] mm/page_isolation: unset migratetype directly for non Buddy page
Date: Wed, 29 Dec 2021 15:53:35 +0100 [thread overview]
Message-ID: <Ycx2b8yla4VzeWWs@localhost.localdomain> (raw)
In-Reply-To: <20211229033649.2760586-1-chenwandun@huawei.com>
On Wed, Dec 29, 2021 at 11:36:49AM +0800, Chen Wandun wrote:
> There is no need to try to move_freepages_block for pages that is not
> in buddy in function unset_migratetype_isolate, it can directly set
> migrate type.
The above could benefit from some rephrasing, someting along these lines
maybe?
"In unset_migratetype_isolate(), we can bypass the call to
move_freepages_block() for non-buddy pages"
>
> It will save a few cpu cycles for some situations such as cma and
> hugetlb when allocating continue pages, in these situation function
> alloc_contig_pages will be called.
>
> alloc_contig_pages
> __alloc_contig_migrate_range
> isolate_freepages_range ==> pages has been remove from buddy
> undo_isolate_page_range
> unset_migratetype_isolate ==> can directly set migratetype
>
> Fixes: 3c605096d315 ("mm/page_alloc: restrict max order of merging on isolated pageblock")
> Signed-off-by: Chen Wandun <chenwandun@huawei.com>
I am ok with the "fix", but I don't think this deserves a Fixes tag.
Sure, it can spare some cpu cycles, but besides that, there is no harm
in the actual code unless I missed something.
Others might feel stronger about that.
Reviewed-by: Oscar Salvador <osalvador@suse.de>
--
Oscar Salvador
SUSE Labs
next prev parent reply other threads:[~2021-12-29 14:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-29 3:36 [PATCH] mm/page_isolation: unset migratetype directly for non Buddy page Chen Wandun
2021-12-29 14:53 ` Oscar Salvador [this message]
2022-01-14 20:50 ` Guillaume Tucker
2022-01-17 3:48 ` Chen Wandun
2022-01-17 6:29 ` Chen Wandun
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=Ycx2b8yla4VzeWWs@localhost.localdomain \
--to=osalvador@suse.de \
--cc=akpm@linux-foundation.org \
--cc=chenwandun@huawei.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vbabka@suse.cz \
--cc=wangkefeng.wang@huawei.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 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.