From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>,
Andrew Morton <akpm@linux-foundation.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: casper.li@mediatek.com, chinwen.chang@mediatek.com,
qun-wei.lin@mediatek.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] mm: page_alloc: remove duplication of free_one_page()
Date: Wed, 20 Dec 2023 17:43:18 +0800 [thread overview]
Message-ID: <7ec7bbfd-41db-4a62-b58a-315ad244c0aa@linux.alibaba.com> (raw)
In-Reply-To: <20231220074757.3656-1-Kuan-Ying.Lee@mediatek.com>
Hi,
On 12/20/2023 3:47 PM, Kuan-Ying Lee wrote:
> Remove duplication of free_one_page().
>
> Cc: Casper Li <casper.li@mediatek.com>
> Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Just FYI:
There is already a same patch submitted, see:
https://lore.kernel.org/all/20231216030503.2126130-1-yajun.deng@linux.dev/T/#u
> ---
> mm/page_alloc.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 2f646773a934..f46af8616cac 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -1262,7 +1262,6 @@ static void free_one_page(struct zone *zone,
> static void __free_pages_ok(struct page *page, unsigned int order,
> fpi_t fpi_flags)
> {
> - unsigned long flags;
> int migratetype;
> unsigned long pfn = page_to_pfn(page);
> struct zone *zone = page_zone(page);
> @@ -1277,13 +1276,7 @@ static void __free_pages_ok(struct page *page, unsigned int order,
> */
> migratetype = get_pfnblock_migratetype(page, pfn);
>
> - spin_lock_irqsave(&zone->lock, flags);
> - if (unlikely(has_isolate_pageblock(zone) ||
> - is_migrate_isolate(migratetype))) {
> - migratetype = get_pfnblock_migratetype(page, pfn);
> - }
> - __free_one_page(page, pfn, zone, order, migratetype, fpi_flags);
> - spin_unlock_irqrestore(&zone->lock, flags);
> + free_one_page(zone, page, pfn, order, migratetype, fpi_flags);
>
> __count_vm_events(PGFREE, 1 << order);
> }
prev parent reply other threads:[~2023-12-20 9:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-20 7:47 Kuan-Ying Lee
2023-12-20 9:43 ` Baolin Wang [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=7ec7bbfd-41db-4a62-b58a-315ad244c0aa@linux.alibaba.com \
--to=baolin.wang@linux.alibaba.com \
--cc=Kuan-Ying.Lee@mediatek.com \
--cc=akpm@linux-foundation.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=casper.li@mediatek.com \
--cc=chinwen.chang@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=matthias.bgg@gmail.com \
--cc=qun-wei.lin@mediatek.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