Re: [PATCH v1 16/29] mm: rename __PageMovable() to page_has_movable_ops()

David Hildenbrand
2025-07-01T12:29:47Z

On 01.07.25 12:59, Lorenzo Stoakes wrote:
> On Mon, Jun 30, 2025 at 02:59:57PM +0200, David Hildenbrand wrote:
>> Let's make it clearer that we are talking about movable_ops pages.
>>
>> While at it, convert a VM_BUG_ON to a VM_WARN_ON_ONCE_PAGE.
>
> <3
>
>>
>> Reviewed-by: Zi Yan <ziy@nvidia.com>
>> Signed-off-by: David Hildenbrand <david@redhat.com>
>
> Great, love it.
>
> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
>
> I noticed that the Simplified Chinese documentation has references for this, but
> again we have to defer to somebody fluent in this of course!
>
> but also in mm/memory_hotplug.c in scan_movable_pages():
>
> /*
> * PageOffline() pages that are not marked __PageMovable() and
>
> Trivial one but might be worth fixing that up also?

Ah, yes, missed that, burried under the the Chinese doc occurrences.

diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 5fad126949d08..69a636e20f7bb 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1763,7 +1763,7 @@ static int scan_movable_pages(unsigned long start, unsigned long end,
goto found;

/*
- * PageOffline() pages that are not marked __PageMovable() and
+ * PageOffline() pages that do not have movable_ops and
* have a reference count > 0 (after MEM_GOING_OFFLINE) are
* definitely unmovable. If their reference count would be 0,
* they could at least be skipped when offlining memory.

--
Cheers,

David / dhildenb