Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp446824rdb; Wed, 20 Dec 2023 01:43:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+F1cxaQskfTet/35aMXskDhGod4rKTE8Vte5g9VRvAq0uOcVtfDiW2NhFiY3lFFOmNrke X-Received: by 2002:a17:906:d282:b0:9fe:81a:c258 with SMTP id ay2-20020a170906d28200b009fe081ac258mr11378809ejb.26.1703065389462; Wed, 20 Dec 2023 01:43:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703065389; cv=none; d=google.com; s=arc-20160816; b=rwYmjlBtGgZAtAuJ4gZFhGQa20FDqvgIjRsFO7UzlMpY0kTliszd9XWwz9BsrJpC9M Jnl8/VkpFlp/EaCr0ZMCLsuVXiu2eUxzCYiEUwY3Sh8SykPNkq4HPoLpoBLLn0Mb9zDE 3gztcyY7ia796x3xjN8KLHzRdCKyPcCWkADXhqVjfBPOnFhwj+wNRcFVyg/PvKqvMR1w aPdr8jCMUShnov0K1W4Cfq7G67IRVVNu0PdMVXFmfciVqJn4ViJqDR5hoqr01od1gxh0 N7t8uy/rRvO+GYkIPjcYh9Ax9NuwJsQKmXh+qdMRo+XaYPGyUq/P21a60x/UEfshC9ar kPVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=QCCFmN/TrnXksC8NDo6RdczkIJnuvoOy3ov6xvWc8xw=; fh=osBUWa+KLX+exfQYqRHklL0uJkUnqQmSMu+QqNq5FYE=; b=NOuaDQQ4x4M0BiLBKEdqXW02b4JGz/Vzi2ZZx85mW6NdfyOX1ICHdxwD2J3CFkzYy/ 6eWnDykbMvD+HbbAiPI7l0zIO/yu5slIuctIzK0j67Bi1njdKt7K8seyJiChgUKrmA/R wza4jYxxXdsIwIRa0+1d8q1Q/k0rbiAUT9M3KrAhOUDMWgGADGaSK69ENGTpNUNvr2VX R9gTApouJorNZ2YeLDuhfq+GosUQ/b816wIUcPGOaqygKA3hCWqdsfAg8tDpsmVlNmYU SQi5fqC7B/tcS4Z6QfmRPIzz34+46J/iOJPp0LdaLCqwtaOyVqnsVxPe0rOtwpYbAdSZ rVtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-6646-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6646-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c11-20020a170906340b00b00a230dded6e4si3355906ejb.851.2023.12.20.01.43.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 01:43:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6646-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-6646-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6646-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3B48E1F264BB for ; Wed, 20 Dec 2023 09:43:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E0481F606; Wed, 20 Dec 2023 09:43:02 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A38A51F5E4 for ; Wed, 20 Dec 2023 09:42:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VyttMeo_1703065374; Received: from 30.97.48.56(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VyttMeo_1703065374) by smtp.aliyun-inc.com; Wed, 20 Dec 2023 17:42:55 +0800 Message-ID: <7ec7bbfd-41db-4a62-b58a-315ad244c0aa@linux.alibaba.com> Date: Wed, 20 Dec 2023 17:43:18 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mm: page_alloc: remove duplication of free_one_page() To: Kuan-Ying Lee , Andrew Morton , Matthias Brugger , AngeloGioacchino Del Regno 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 References: <20231220074757.3656-1-Kuan-Ying.Lee@mediatek.com> From: Baolin Wang In-Reply-To: <20231220074757.3656-1-Kuan-Ying.Lee@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, On 12/20/2023 3:47 PM, Kuan-Ying Lee wrote: > Remove duplication of free_one_page(). > > Cc: Casper Li > Signed-off-by: Kuan-Ying Lee 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); > }