Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp921670rwd; Thu, 25 May 2023 06:01:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5XKJ7PI2fj3aogKsNjpG/eSn+FxL1OsvdxyCmYfR070OBM4UmJIzN6EWP5trG0C8LvZ++p X-Received: by 2002:a92:cc48:0:b0:331:3b07:56e2 with SMTP id t8-20020a92cc48000000b003313b0756e2mr13796759ilq.31.1685019701806; Thu, 25 May 2023 06:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685019701; cv=none; d=google.com; s=arc-20160816; b=NSOmb2AdcZg5eRZRdrRSvbBTDIi1Ubo0TCnZ+BKn5mKeWiL5F+EfkfRtSW0MSZCmhx AVzHe0qxkCw6kK1ooblIkFs5ivm13hPuwno1Fe3O1uIQVLXXlLs6Ha38fIgJeBIy9wZb AbUdVBGFBiHjZ37EiarpQk4LVWnDyS5nXOSiOI3gC6T7ofN/RoDOo6bH62wgPOxKMCsY QXK1W+0oPOvhOQiFivCJp/3wgWLmCzEMbKODTFKsR7nCZ73xUWzLI3BB6DbgFH3+M9NC tlXMcK07JGrn4gIvUHa3BI/hJBta+AqXhO6D1Vk2y7nRKWlYX4cUtAIjjH9DYPt8JpiB lWfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mreEMDSeY2JC7ArjqMMVi/9sS2N/VZgQ7hVIQpjkd4M=; b=ilDUR9Mf4MvxpnnGmKpDn8Y8/4lPGmjIZo+tOmDFT+xSTAt6ao4yLbmWPInCSaRHlQ s8BrrhfPiMjC/31Bf8tnu1464RTa+GA+gzzCrTJrs4i7HlfDmaQSVZqGLD5Q/wtIt766 YzLmGu10x09qVmHv0c/SZoRAHSfLUKaFA5ADrDeF+8HezJ+qi8HUq6pkHdU3rguoKP6v cH4Ooz9yFhdrADavVIPG4BzahMjWhP3jXHzWSova7OHRr3Pu6u/3PfM+E+rRE7ihJOzi ajOemtwLQYk3vla0P+wxUzln27juS4KX9QbBHQUX3rNiHQBXrW/B5s8qjzR/nnVXoZdR akkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s132-20020a63778a000000b0052cc25bd286si1115495pgc.756.2023.05.25.06.01.24; Thu, 25 May 2023 06:01:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239208AbjEYMyU (ORCPT + 99 others); Thu, 25 May 2023 08:54:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231895AbjEYMyS (ORCPT ); Thu, 25 May 2023 08:54:18 -0400 Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D241187 for ; Thu, 25 May 2023 05:54:16 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R621e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VjSJ3fp_1685019252; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VjSJ3fp_1685019252) by smtp.aliyun-inc.com; Thu, 25 May 2023 20:54:13 +0800 From: Baolin Wang To: akpm@linux-foundation.org Cc: mgorman@techsingularity.net, vbabka@suse.cz, baolin.wang@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] mm: compaction: change fast_isolate_freepages() to void type Date: Thu, 25 May 2023 20:53:57 +0800 Message-Id: <759fca20b22ebf4c81afa30496837b9e0fb2e53b.1685018752.git.baolin.wang@linux.alibaba.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No caller cares about the return value of fast_isolate_freepages(), void it. Signed-off-by: Baolin Wang --- mm/compaction.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index 426bb6ce070b..3737c6591bfb 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -1435,8 +1435,7 @@ static int next_search_order(struct compact_control *cc, int order) return order; } -static unsigned long -fast_isolate_freepages(struct compact_control *cc) +static void fast_isolate_freepages(struct compact_control *cc) { unsigned int limit = max(1U, freelist_scan_limit(cc) >> 1); unsigned int nr_scanned = 0; @@ -1449,7 +1448,7 @@ fast_isolate_freepages(struct compact_control *cc) /* Full compaction passes in a negative order */ if (cc->order <= 0) - return cc->free_pfn; + return; /* * If starting the scan, use a deeper search and use the highest @@ -1588,11 +1587,10 @@ fast_isolate_freepages(struct compact_control *cc) cc->total_free_scanned += nr_scanned; if (!page) - return cc->free_pfn; + return; low_pfn = page_to_pfn(page); fast_isolate_around(cc, low_pfn); - return low_pfn; } /* -- 2.27.0