linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: page_alloc: use the correct type of list for free pages
@ 2023-06-21  8:14 Baolin Wang
  2023-06-21 10:45 ` Mel Gorman
  2023-06-21 11:16 ` David Hildenbrand
  0 siblings, 2 replies; 3+ messages in thread
From: Baolin Wang @ 2023-06-21  8:14 UTC (permalink / raw)
  To: akpm; +Cc: mgorman, baolin.wang, linux-mm, linux-kernel

Commit bf75f200569d ("mm/page_alloc: add page->buddy_list and page->pcp_list")
introduces page->buddy_list and page->pcp_list as a union with page->lru, but
missed to change get_page_from_free_area() to use page->buddy_list to clarify
the correct type of list for a free page.

Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
---
 mm/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5c691426822a..c1839a53326c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -727,7 +727,7 @@ static inline struct page *get_page_from_free_area(struct free_area *area,
 					    int migratetype)
 {
 	return list_first_entry_or_null(&area->free_list[migratetype],
-					struct page, lru);
+					struct page, buddy_list);
 }
 
 /*
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm: page_alloc: use the correct type of list for free pages
  2023-06-21  8:14 [PATCH] mm: page_alloc: use the correct type of list for free pages Baolin Wang
@ 2023-06-21 10:45 ` Mel Gorman
  2023-06-21 11:16 ` David Hildenbrand
  1 sibling, 0 replies; 3+ messages in thread
From: Mel Gorman @ 2023-06-21 10:45 UTC (permalink / raw)
  To: Baolin Wang; +Cc: akpm, linux-mm, linux-kernel

On Wed, Jun 21, 2023 at 04:14:28PM +0800, Baolin Wang wrote:
> Commit bf75f200569d ("mm/page_alloc: add page->buddy_list and page->pcp_list")
> introduces page->buddy_list and page->pcp_list as a union with page->lru, but
> missed to change get_page_from_free_area() to use page->buddy_list to clarify
> the correct type of list for a free page.
> 
> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>

Acked-by: Mel Gorman <mgorman@techsingularity.net>

-- 
Mel Gorman
SUSE Labs


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm: page_alloc: use the correct type of list for free pages
  2023-06-21  8:14 [PATCH] mm: page_alloc: use the correct type of list for free pages Baolin Wang
  2023-06-21 10:45 ` Mel Gorman
@ 2023-06-21 11:16 ` David Hildenbrand
  1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2023-06-21 11:16 UTC (permalink / raw)
  To: Baolin Wang, akpm; +Cc: mgorman, linux-mm, linux-kernel

On 21.06.23 10:14, Baolin Wang wrote:
> Commit bf75f200569d ("mm/page_alloc: add page->buddy_list and page->pcp_list")
> introduces page->buddy_list and page->pcp_list as a union with page->lru, but
> missed to change get_page_from_free_area() to use page->buddy_list to clarify
> the correct type of list for a free page.
> 
> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> ---
>   mm/page_alloc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 5c691426822a..c1839a53326c 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -727,7 +727,7 @@ static inline struct page *get_page_from_free_area(struct free_area *area,
>   					    int migratetype)
>   {
>   	return list_first_entry_or_null(&area->free_list[migratetype],
> -					struct page, lru);
> +					struct page, buddy_list);
>   }
>   
>   /*

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-21 11:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-21  8:14 [PATCH] mm: page_alloc: use the correct type of list for free pages Baolin Wang
2023-06-21 10:45 ` Mel Gorman
2023-06-21 11:16 ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).