[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ycx2b8yla4VzeWWs@localhost.localdomain>
Date: Wed, 29 Dec 2021 15:53:35 +0100
From: Oscar Salvador <osalvador@...e.de>
To: Chen Wandun <chenwandun@...wei.com>
Cc: akpm@...ux-foundation.org, vbabka@...e.cz, iamjoonsoo.kim@....com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
wangkefeng.wang@...wei.com
Subject: Re: [PATCH] mm/page_isolation: unset migratetype directly for non
Buddy page
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@...wei.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@...e.de>
--
Oscar Salvador
SUSE Labs
Powered by blists - more mailing lists