From patchwork Thu May 25 12:53:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 13255181 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 216D7C7EE2D for ; Thu, 25 May 2023 12:54:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F08A3900002; Thu, 25 May 2023 08:54:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EB93A900005; Thu, 25 May 2023 08:54:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D813C900002; Thu, 25 May 2023 08:54:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id B3C2A900005 for ; Thu, 25 May 2023 08:54:20 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 6317C140B38 for ; Thu, 25 May 2023 12:54:20 +0000 (UTC) X-FDA: 80828770680.18.3C539D7 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by imf18.hostedemail.com (Postfix) with ESMTP id C63621C0016 for ; Thu, 25 May 2023 12:54:17 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf18.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.132 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685019258; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mreEMDSeY2JC7ArjqMMVi/9sS2N/VZgQ7hVIQpjkd4M=; b=NEYzTfab0gowunVSEmZnjpHvpQ1qg+ZgAkz/v4zUHz8F/6I68ib7ovz3/rixuVGnWdR3+X 3X/yTZ/h4Anz848agCK4dq9il8HKEOQXTI9YGpxn+44UEYxeethhu9Pw22Yc3drV2AgvHA 1cJf4fYlC/hh3hEmCtOR2HhL1ZFwiJA= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf18.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.132 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685019258; a=rsa-sha256; cv=none; b=hxxkVK8F0Sn0Y03y/zNsUaxocV9n2REFMMBxGXmP9ZjWsk6Di4c/A52EPqNlhRGAl+o4Hw /DRacRSYgHsn8iVgSeERoN1vMp6b+OUm3Gd18e28XwtTUiUs4a6n0nuGQJoYEObeahzUtX Y91zQEzaVIPPVDpAqkwJhMd6FZ7FM08= 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 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: C63621C0016 X-Stat-Signature: osoa4fxr41tmmhkn3xwye7y3tumoe6n4 X-HE-Tag: 1685019257-356364 X-HE-Meta: U2FsdGVkX1/0Z/IZ6wBbmGyF0ptIS4ER5Xrh+rztzq9Y6txwB6GnkvNjBSfeXvUYD09zrfMsjTw0G87B+aS/g8RQCSnh5Jfmsm3pmpwbURiUkkSnLBlztdAH+ljrzyFtOcrZ3S6MZpIYL4/wbPmH608+vzYXwFS+YRWTX+oY1b+yzpogRHdWMZ70W7pQMxbk+dUdg/ScWLgxAgauuZGlVi8FzJ2wZ1Uoqkn/hnY4SXCMy61WzCkhEbQRG2rPEYBKjgdE0szxs4p58u372DtD6eTvNd4JVJKqTDBTQ7nkTezBSqw/J3/VaOtHq0azCpxw1uuYenzBctfvEFIqM+/WiG73Ap0gFIzdQ+cT++eSW71KF1+J/FqnB/LiZFndLBzXhHjXKBtZizAXRfcJytAHLRtxzdhXCoiWGS2UFL54wEeDMuJ9DO2OPCsUgrllFewW5KbNsMtVfCZqQDOzUg6HvnQd5zTN4XTndvZFaoTrHBg3iiujTj7TSbzc2nHSptkCOWE2tnYx0iudsS3/yQwQ/SDkc6Tkl5t/poWpbHjOzEtJntSbunHBU0/ZBgPul1NUMvSGpij7mLB6OyexSvxyWITyjJ+gCRah1sCOS8GoY8t2mUzCn0xMapZheH0KfNWnaFs88GpDphlF8xd98myCdWd6hmaq5oxB4HTayZhZRfursxUUz2ljOInjMBDKpDmUWWIQ9TjthhQFTwFGzD4aPr8Vs+YLm2yTZ43GkIHt6So9cM+0cuFD81Ng36zNnTvrMMBPvgrheWX89UoR7wKHfbORH7d/I/joqhqqZuTTPIUzp39Rqp1Dr4VjVQsEyceD2HQsKet94NxnRXmQ/qf0rVv0iHBMDadFun+RfZXzsXO7PnUx9BMAjZT70qwSIA/X107ltdwhQAjEW8SwnHLd7oBKcqy2GdBZasJc9rzw8ImuWKRRv/QmRhPmmUb5IBdjYWuij+Jftzv3sa2fiVt dzEaVvAg 7l7rFFs7x9j5j50EWqtGEXj12qxAeKnrqkoMkWWhLQ9LBfFv0GkQRAsYvAhx/NcsGWPb+0l95jPlqvoIqFbD48uhnZhXr2r13xAQ2yv0dJovolOdiLZxRTwc2vTYjKTSdyfscojNadNn7vxM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: No caller cares about the return value of fast_isolate_freepages(), void it. Signed-off-by: Baolin Wang Acked-by: Vlastimil Babka --- 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; } /*