linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Baolin Wang <baolin.wang@linux.alibaba.com>, akpm@linux-foundation.org
Cc: mgorman@techsingularity.net, vbabka@suse.cz,
	ying.huang@intel.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mm: compaction: use the correct type of list for free pages
Date: Fri, 7 Jul 2023 13:52:32 +0200	[thread overview]
Message-ID: <df011987-289e-7923-3df6-d69c0fb06d61@redhat.com> (raw)
In-Reply-To: <b21cd8e2e32b9a1d9bc9e43ebf8acaf35e87f8df.1688715750.git.baolin.wang@linux.alibaba.com>

On 07.07.23 10:51, Baolin Wang wrote:
> Use the page->buddy_list instead of page->lru to clarify the correct type
> of list for free pages.
> 
> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> ---
>   mm/compaction.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index dbc9f86b1934..43358efdbdc2 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -1500,7 +1500,7 @@ static void fast_isolate_freepages(struct compact_control *cc)
>   
>   		spin_lock_irqsave(&cc->zone->lock, flags);
>   		freelist = &area->free_list[MIGRATE_MOVABLE];
> -		list_for_each_entry_reverse(freepage, freelist, lru) {
> +		list_for_each_entry_reverse(freepage, freelist, buddy_list) {
>   			unsigned long pfn;
>   
>   			order_scanned++;
> @@ -1883,7 +1883,7 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc)
>   
>   		spin_lock_irqsave(&cc->zone->lock, flags);
>   		freelist = &area->free_list[MIGRATE_MOVABLE];
> -		list_for_each_entry(freepage, freelist, lru) {
> +		list_for_each_entry(freepage, freelist, buddy_list) {
>   			unsigned long free_pfn;
>   
>   			if (nr_scanned++ >= limit) {

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

-- 
Cheers,

David / dhildenb



      parent reply	other threads:[~2023-07-07 11:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07  8:51 Baolin Wang
2023-07-07  8:51 ` [PATCH 2/2] mm: compaction: skip the memory hole rapidly when isolating " Baolin Wang
2023-07-07 11:56   ` David Hildenbrand
2023-07-10  6:11   ` Huang, Ying
2023-07-10  9:26     ` Baolin Wang
2023-07-11  0:37       ` Huang, Ying
2023-07-07 11:52 ` David Hildenbrand [this message]

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=df011987-289e-7923-3df6-d69c0fb06d61@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=vbabka@suse.cz \
    --cc=ying.huang@intel.com \
    /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