From: Zi Yan <ziy@nvidia.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: David Hildenbrand <david@redhat.com>,
Oscar Salvador <osalvador@suse.de>,
linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Vlastimil Babka <vbabka@suse.cz>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
Mel Gorman <mgorman@techsingularity.net>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
Brendan Jackman <jackmanb@google.com>,
Richard Chang <richardycc@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 4/4] mm/page_isolation: remove migratetype parameter from more functions.
Date: Sun, 18 May 2025 13:24:51 -0400 [thread overview]
Message-ID: <9C203B16-F808-4043-9651-2B126F41F987@nvidia.com> (raw)
In-Reply-To: <20250518163235.GA731066@cmpxchg.org>
On 18 May 2025, at 12:32, Johannes Weiner wrote:
> On Fri, May 09, 2025 at 04:01:11PM -0400, Zi Yan wrote:
>> @@ -22,8 +22,25 @@ static inline bool is_migrate_isolate(int migratetype)
>> }
>> #endif
>>
>> -#define MEMORY_OFFLINE 0x1
>> -#define REPORT_FAILURE 0x2
>> +/*
>> + * Isolation modes:
>> + * ISOLATE_MODE_NONE - isolate for other purposes than those below
>> + * MEMORY_OFFLINE - isolate to offline (!allocate) memory e.g., skip over
>> + * PageHWPoison() pages and PageOffline() pages.
>> + * CMA_ALLOCATION - isolate for CMA allocations
>> + */
>> +enum isolate_mode_t {
>> + ISOLATE_MODE_NONE,
>> + MEMORY_OFFLINE,
>> + CMA_ALLOCATION,
>> +};
>> +
>> +/*
>> + * Isolation flags:
>> + * REPORT_FAILURE - report details about the failure to isolate the range
>> + */
>> +typedef unsigned int __bitwise isolate_flags_t;
>> +#define REPORT_FAILURE ((__force isolate_flags_t)BIT(0))
>>
>> void set_pageblock_migratetype(struct page *page, int migratetype);
>> void set_pageblock_isolate(struct page *page);
>> @@ -32,10 +49,10 @@ bool pageblock_isolate_and_move_free_pages(struct zone *zone, struct page *page)
>> bool pageblock_unisolate_and_move_free_pages(struct zone *zone, struct page *page);
>>
>> int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
>> - int migratetype, int flags);
>> + isolate_mode_t mode, isolate_flags_t flags);
>
> This should be 'enum isolate_mode_t', right?
>
> (isolate_mode_t also exists, but it's something else)
Oh, I did not realize that. Let me rename it to pb_isolate_mode_t.
Thanks.
--
Best Regards,
Yan, Zi
next prev parent reply other threads:[~2025-05-18 17:24 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 20:01 [PATCH v4 0/4] Make MIGRATE_ISOLATE a standalone bit Zi Yan
2025-05-09 20:01 ` [PATCH v4 1/4] mm/page_isolation: make page isolation " Zi Yan
2025-05-13 11:32 ` Brendan Jackman
2025-05-13 14:53 ` Zi Yan
2025-05-19 8:08 ` David Hildenbrand
2025-05-19 15:08 ` Zi Yan
2025-05-19 16:42 ` David Hildenbrand
2025-05-19 17:15 ` Zi Yan
2025-05-21 11:16 ` Zi Yan
2025-05-21 11:57 ` David Hildenbrand
2025-05-21 12:00 ` Zi Yan
2025-05-21 12:11 ` David Hildenbrand
2025-05-21 12:18 ` Zi Yan
2025-05-09 20:01 ` [PATCH v4 2/4] mm/page_isolation: remove migratetype from move_freepages_block_isolate() Zi Yan
2025-05-12 6:25 ` kernel test robot
2025-05-12 16:10 ` Lorenzo Stoakes
2025-05-12 16:13 ` Zi Yan
2025-05-12 16:19 ` Lorenzo Stoakes
2025-05-12 16:28 ` Zi Yan
2025-05-12 22:00 ` Andrew Morton
2025-05-12 23:20 ` Zi Yan
2025-05-19 8:21 ` David Hildenbrand
2025-05-19 23:06 ` Zi Yan
2025-05-20 8:58 ` David Hildenbrand
2025-05-09 20:01 ` [PATCH v4 3/4] mm/page_isolation: remove migratetype from undo_isolate_page_range() Zi Yan
2025-05-09 20:01 ` [PATCH v4 4/4] mm/page_isolation: remove migratetype parameter from more functions Zi Yan
2025-05-17 20:21 ` Vlastimil Babka
2025-05-18 0:07 ` Zi Yan
2025-05-18 16:32 ` Johannes Weiner
2025-05-18 17:24 ` Zi Yan [this message]
2025-05-17 20:26 ` [PATCH v4 0/4] Make MIGRATE_ISOLATE a standalone bit Vlastimil Babka
2025-05-18 0:20 ` Zi Yan
2025-05-19 14:15 ` David Hildenbrand
2025-05-19 14:35 ` Zi Yan
2025-05-20 8:58 ` David Hildenbrand
2025-05-20 13:18 ` Zi Yan
2025-05-20 13:20 ` David Hildenbrand
2025-05-20 13:31 ` Zi Yan
2025-05-20 13:33 ` David Hildenbrand
2025-05-20 14:07 ` Zi Yan
2025-05-19 7:44 ` David Hildenbrand
2025-05-19 14:01 ` 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=9C203B16-F808-4043-9651-2B126F41F987@nvidia.com \
--to=ziy@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=jackmanb@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=osalvador@suse.de \
--cc=richardycc@google.com \
--cc=surenb@google.com \
--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
all inboxes | Powered by JetHome®