From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3537C04FDF for ; Tue, 15 Aug 2023 02:58:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234377AbjHOC5t (ORCPT ); Mon, 14 Aug 2023 22:57:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234153AbjHOC5c (ORCPT ); Mon, 14 Aug 2023 22:57:32 -0400 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27B63E7A for ; Mon, 14 Aug 2023 19:57:30 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VppsQQz_1692068247; Received: from 30.97.48.59(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VppsQQz_1692068247) by smtp.aliyun-inc.com; Tue, 15 Aug 2023 10:57:28 +0800 Message-ID: Date: Tue, 15 Aug 2023 10:57:29 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH] mm/compaction: remove unused parameter pgdata of fragmentation_score_wmark To: Kemeng Shi , linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, mgorman@techsingularity.net, david@redhat.com, willy@infradead.org References: <20230809094910.3092446-1-shikemeng@huaweicloud.com> From: Baolin Wang In-Reply-To: <20230809094910.3092446-1-shikemeng@huaweicloud.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/9/2023 5:49 PM, Kemeng Shi wrote: > Parameter pgdat is not used in fragmentation_score_wmark. Just remove it. > > Signed-off-by: Kemeng Shi Reviewed-by: Baolin Wang > --- > mm/compaction.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/mm/compaction.c b/mm/compaction.c > index ea61922a1619..38c8d216c6a3 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -2142,7 +2142,7 @@ static unsigned int fragmentation_score_node(pg_data_t *pgdat) > return score; > } > > -static unsigned int fragmentation_score_wmark(pg_data_t *pgdat, bool low) > +static unsigned int fragmentation_score_wmark(bool low) > { > unsigned int wmark_low; > > @@ -2162,7 +2162,7 @@ static bool should_proactive_compact_node(pg_data_t *pgdat) > if (!sysctl_compaction_proactiveness || kswapd_is_running(pgdat)) > return false; > > - wmark_high = fragmentation_score_wmark(pgdat, false); > + wmark_high = fragmentation_score_wmark(false); > return fragmentation_score_node(pgdat) > wmark_high; > } > > @@ -2201,7 +2201,7 @@ static enum compact_result __compact_finished(struct compact_control *cc) > return COMPACT_PARTIAL_SKIPPED; > > score = fragmentation_score_zone(cc->zone); > - wmark_low = fragmentation_score_wmark(pgdat, true); > + wmark_low = fragmentation_score_wmark(true); > > if (score > wmark_low) > ret = COMPACT_CONTINUE;