From: Zi Yan <ziy@nvidia.com>
To: David Hildenbrand <david@redhat.com>
Cc: linux-mm@kvack.org, Oscar Salvador <osalvador@suse.de>,
Vlastimil Babka <vbabka@suse.cz>,
Johannes Weiner <hannes@cmpxchg.org>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Mel Gorman <mgorman@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/4] mm/page_isolation: remove migratetype from move_freepages_block_isolate()
Date: Mon, 02 Sep 2024 11:30:34 -0400 [thread overview]
Message-ID: <AAD39CDF-6AC3-432F-B5E1-5D8FD8DA7B42@nvidia.com> (raw)
In-Reply-To: <8f9f16e9-4d89-44ba-a244-9389233b5325@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2281 bytes --]
On 2 Sep 2024, at 10:42, David Hildenbrand wrote:
> On 28.08.24 22:22, Zi Yan wrote:
>> Since migratetype is no longer overwritten during pageblock isolation,
>> moving pageblocks to and from MIGRATE_ISOLATE do not need migratetype.
>>
>> Signed-off-by: Zi Yan <ziy@nvidia.com>
>> ---
>> include/linux/page-isolation.h | 3 +--
>> mm/page_alloc.c | 27 +++++++++++++++++++++------
>> mm/page_isolation.c | 19 +++++++++----------
>> 3 files changed, 31 insertions(+), 18 deletions(-)
>>
>> diff --git a/include/linux/page-isolation.h b/include/linux/page-isolation.h
>> index 11b8695115ea..6a62401410c3 100644
>> --- a/include/linux/page-isolation.h
>> +++ b/include/linux/page-isolation.h
>> @@ -35,8 +35,7 @@ static inline bool is_migrate_isolate(int migratetype)
>> void set_pageblock_migratetype(struct page *page, int migratetype);
>> -bool move_freepages_block_isolate(struct zone *zone, struct page *page,
>> - int migratetype);
>> +bool move_freepages_block_isolate(struct zone *zone, struct page *page);
>> int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
>> int migratetype, int flags, gfp_t gfp_flags);
>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> index 4ea5cd1a07e2..dc7c36461953 100644
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -1764,10 +1764,12 @@ static unsigned long find_large_buddy(unsigned long start_pfn)
>> *
>> * Returns %true if pages could be moved, %false otherwise.
>> */
>> -bool move_freepages_block_isolate(struct zone *zone, struct page *page,
>> - int migratetype)
>> +bool move_freepages_block_isolate(struct zone *zone, struct page *page)
>> {
>> unsigned long start_pfn, pfn;
>> + bool is_block_isolated = get_pageblock_isolate(page);
>> + int from_mt;
>
> I think we should have two functions, one that isolates, another one that un-isolates. Or at least make the semantics not depend on the current state of the pageblock.
>
> bool pageblock_set_isolated_and_move_free_pages(struct zone *zone, struct page *page, bool isolated);
>
> vs.
>
> pageblock_isolate_and_move_free_pages()
> pageblock_unisolate_and_move_free_pages()
Sure. Will do.
--
Best Regards,
Yan, Zi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 854 bytes --]
next prev parent reply other threads:[~2024-09-02 15:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 20:22 [RFC PATCH 0/4] Make MIGRATE_ISOLATE a standalone bit Zi Yan
2024-08-28 20:22 ` [RFC PATCH 1/4] mm/page_isolation: make page isolation " Zi Yan
2024-08-28 20:22 ` [RFC PATCH 2/4] mm/page_isolation: remove migratetype from move_freepages_block_isolate() Zi Yan
2024-09-02 14:42 ` David Hildenbrand
2024-09-02 15:30 ` Zi Yan [this message]
2024-08-28 20:22 ` [RFC PATCH 3/4] mm/page_isolation: remove migratetype from undo_isolate_page_range() Zi Yan
2024-09-02 9:00 ` David Hildenbrand
2024-09-02 15:34 ` Zi Yan
2024-08-28 20:22 ` [RFC PATCH 4/4] mm/page_isolation: remove migratetype parameter from more functions Zi Yan
2024-09-02 9:06 ` David Hildenbrand
2024-09-02 15:34 ` Zi Yan
2024-09-02 16:42 ` David Hildenbrand
2024-09-04 2:02 ` Zi Yan
2024-09-04 8:50 ` David Hildenbrand
2024-09-04 13:53 ` Zi Yan
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=AAD39CDF-6AC3-432F-B5E1-5D8FD8DA7B42@nvidia.com \
--to=ziy@nvidia.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=osalvador@suse.de \
--cc=vbabka@suse.cz \
/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