linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Nicolas Saenz Julienne <nsaenzju@redhat.com>, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	frederic@kernel.org, tglx@linutronix.de, peterz@infradead.org,
	mtosatti@redhat.com, nilal@redhat.com, mgorman@suse.de,
	linux-rt-users@vger.kernel.org, cl@linux.com, ppandit@redhat.com
Subject: Re: [PATCH v2 1/3] mm/page_alloc: Don't pass pfn to free_unref_page_commit()
Date: Tue, 23 Nov 2021 15:41:37 +0100	[thread overview]
Message-ID: <51e45c99-1ad8-339b-0c6a-e88288fa41ba@suse.cz> (raw)
In-Reply-To: <20211103170512.2745765-2-nsaenzju@redhat.com>

On 11/3/21 18:05, Nicolas Saenz Julienne wrote:
> free_unref_page_commit() doesn't make use of its pfn argument, so get
> rid of it.

Yeah, looks like since df1acc856923 ("mm/page_alloc: avoid conflating IRQs
disabled with zone->lock")

> Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>

Reviewed-by: Vlastimil Babka <vbabka@suse.cz>

> ---
>  mm/page_alloc.c | 17 ++++++-----------
>  1 file changed, 6 insertions(+), 11 deletions(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index c5952749ad40..9ef03dfb8f95 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -3355,8 +3355,8 @@ static int nr_pcp_high(struct per_cpu_pages *pcp, struct zone *zone)
>  	return min(READ_ONCE(pcp->batch) << 2, high);
>  }
>  
> -static void free_unref_page_commit(struct page *page, unsigned long pfn,
> -				   int migratetype, unsigned int order)
> +static void free_unref_page_commit(struct page *page, int migratetype,
> +				   unsigned int order)
>  {
>  	struct zone *zone = page_zone(page);
>  	struct per_cpu_pages *pcp;
> @@ -3405,7 +3405,7 @@ void free_unref_page(struct page *page, unsigned int order)
>  	}
>  
>  	local_lock_irqsave(&pagesets.lock, flags);
> -	free_unref_page_commit(page, pfn, migratetype, order);
> +	free_unref_page_commit(page, migratetype, order);
>  	local_unlock_irqrestore(&pagesets.lock, flags);
>  }
>  
> @@ -3415,13 +3415,13 @@ void free_unref_page(struct page *page, unsigned int order)
>  void free_unref_page_list(struct list_head *list)
>  {
>  	struct page *page, *next;
> -	unsigned long flags, pfn;
> +	unsigned long flags;
>  	int batch_count = 0;
>  	int migratetype;
>  
>  	/* Prepare pages for freeing */
>  	list_for_each_entry_safe(page, next, list, lru) {
> -		pfn = page_to_pfn(page);
> +		unsigned long pfn = page_to_pfn(page);
>  		if (!free_unref_page_prepare(page, pfn, 0)) {
>  			list_del(&page->lru);
>  			continue;
> @@ -3437,15 +3437,10 @@ void free_unref_page_list(struct list_head *list)
>  			free_one_page(page_zone(page), page, pfn, 0, migratetype, FPI_NONE);
>  			continue;
>  		}
> -
> -		set_page_private(page, pfn);
>  	}
>  
>  	local_lock_irqsave(&pagesets.lock, flags);
>  	list_for_each_entry_safe(page, next, list, lru) {
> -		pfn = page_private(page);
> -		set_page_private(page, 0);
> -
>  		/*
>  		 * Non-isolated types over MIGRATE_PCPTYPES get added
>  		 * to the MIGRATE_MOVABLE pcp list.
> @@ -3455,7 +3450,7 @@ void free_unref_page_list(struct list_head *list)
>  			migratetype = MIGRATE_MOVABLE;
>  
>  		trace_mm_page_free_batched(page);
> -		free_unref_page_commit(page, pfn, migratetype, 0);
> +		free_unref_page_commit(page, migratetype, 0);
>  
>  		/*
>  		 * Guard against excessive IRQ disabled times when we get
> 



  reply	other threads:[~2021-11-23 14:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-03 17:05 [PATCH v2 0/3] mm/page_alloc: Remote per-cpu page list drain support Nicolas Saenz Julienne
2021-11-03 17:05 ` [PATCH v2 1/3] mm/page_alloc: Don't pass pfn to free_unref_page_commit() Nicolas Saenz Julienne
2021-11-23 14:41   ` Vlastimil Babka [this message]
2021-11-03 17:05 ` [PATCH v2 2/3] mm/page_alloc: Convert per-cpu lists' local locks to per-cpu spin locks Nicolas Saenz Julienne
2021-11-04 14:38   ` [mm/page_alloc] 5541e53659: BUG:spinlock_bad_magic_on_CPU kernel test robot
2021-11-04 16:39     ` Nicolas Saenz Julienne
2021-11-03 17:05 ` [PATCH v2 3/3] mm/page_alloc: Remotely drain per-cpu lists Nicolas Saenz Julienne
2021-12-03 14:13   ` Mel Gorman
2021-12-09 10:50     ` Nicolas Saenz Julienne
2021-12-09 17:45     ` Marcelo Tosatti
2021-12-10 10:55       ` Mel Gorman
2021-12-14 10:58         ` Marcelo Tosatti
2021-12-14 11:42           ` Christoph Lameter
2021-12-14 12:25             ` Marcelo Tosatti
2021-11-23 14:58 ` [PATCH v2 0/3] mm/page_alloc: Remote per-cpu page list drain support Vlastimil Babka
2021-11-30 18:09   ` Nicolas Saenz Julienne
2021-12-01 14:01     ` Marcelo Tosatti

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=51e45c99-1ad8-339b-0c6a-e88288fa41ba@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mtosatti@redhat.com \
    --cc=nilal@redhat.com \
    --cc=nsaenzju@redhat.com \
    --cc=peterz@infradead.org \
    --cc=ppandit@redhat.com \
    --cc=tglx@linutronix.de \
    /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