[PATCH RFC 05/29] mm/balloon_compaction: make PageOffline sticky

David Hildenbrand posted 29 patches 3 months, 3 weeks ago
There is a newer version of this series
[PATCH RFC 05/29] mm/balloon_compaction: make PageOffline sticky
Posted by David Hildenbrand 3 months, 3 weeks ago
Let the buddy handle clearing the type.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 include/linux/balloon_compaction.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h
index b9f19da37b089..bfc6e50bd004b 100644
--- a/include/linux/balloon_compaction.h
+++ b/include/linux/balloon_compaction.h
@@ -140,7 +140,7 @@ static inline void balloon_page_finalize(struct page *page)
 		__ClearPageMovable(page);
 		set_page_private(page, 0);
 	}
-	__ClearPageOffline(page);
+	/* PageOffline is sticky until the page is freed to the buddy. */
 }
 
 /*
-- 
2.49.0
Re: [PATCH RFC 05/29] mm/balloon_compaction: make PageOffline sticky
Posted by Harry Yoo 3 months, 1 week ago
On Wed, Jun 18, 2025 at 07:39:48PM +0200, David Hildenbrand wrote:
> Let the buddy handle clearing the type.
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---

with the updated commit message,
Acked-by: Harry Yoo <harry.yoo@oracle.com>

>  include/linux/balloon_compaction.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h
> index b9f19da37b089..bfc6e50bd004b 100644
> --- a/include/linux/balloon_compaction.h
> +++ b/include/linux/balloon_compaction.h
> @@ -140,7 +140,7 @@ static inline void balloon_page_finalize(struct page *page)
>  		__ClearPageMovable(page);
>  		set_page_private(page, 0);
>  	}
> -	__ClearPageOffline(page);
> +	/* PageOffline is sticky until the page is freed to the buddy. */
>  }
>  
>  /*
> -- 
> 2.49.0
> 

-- 
Cheers,
Harry / Hyeonggon
Re: [PATCH RFC 05/29] mm/balloon_compaction: make PageOffline sticky
Posted by Zi Yan 3 months, 3 weeks ago
On 18 Jun 2025, at 13:39, David Hildenbrand wrote:

> Let the buddy handle clearing the type.

The below might be more precise? Since page type is cleared
before the page reaches buddy code.

Let the free page routine handle clearing the type.

>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  include/linux/balloon_compaction.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h
> index b9f19da37b089..bfc6e50bd004b 100644
> --- a/include/linux/balloon_compaction.h
> +++ b/include/linux/balloon_compaction.h
> @@ -140,7 +140,7 @@ static inline void balloon_page_finalize(struct page *page)
>  		__ClearPageMovable(page);
>  		set_page_private(page, 0);
>  	}
> -	__ClearPageOffline(page);
> +	/* PageOffline is sticky until the page is freed to the buddy. */
>  }
>
>  /*
> -- 
> 2.49.0

Acked-by: Zi Yan <ziy@nvidia.com>

Best Regards,
Yan, Zi
Re: [PATCH RFC 05/29] mm/balloon_compaction: make PageOffline sticky
Posted by David Hildenbrand 3 months, 2 weeks ago
On 18.06.25 20:50, Zi Yan wrote:
> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
> 
>> Let the buddy handle clearing the type.
> 
> The below might be more precise? Since page type is cleared
> before the page reaches buddy code.
> 
> Let the free page routine handle clearing the type.

"Let the page freeing code handle clearing the page type."

?

Thanks!

-- 
Cheers,

David / dhildenb
Re: [PATCH RFC 05/29] mm/balloon_compaction: make PageOffline sticky
Posted by Zi Yan 3 months, 2 weeks ago
On 23 Jun 2025, at 11:28, David Hildenbrand wrote:

> On 18.06.25 20:50, Zi Yan wrote:
>> On 18 Jun 2025, at 13:39, David Hildenbrand wrote:
>>
>>> Let the buddy handle clearing the type.
>>
>> The below might be more precise? Since page type is cleared
>> before the page reaches buddy code.
>>
>> Let the free page routine handle clearing the type.
>
> "Let the page freeing code handle clearing the page type."
>
> ?
>

Sounds good to me. :)

--
Best Regards,
Yan, Zi