From patchwork Mon Apr 29 22:44:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SeongJae Park X-Patchwork-Id: 13647843 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 8EF65C4345F for ; Mon, 29 Apr 2024 22:45:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 57F906B0095; Mon, 29 Apr 2024 18:45:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 52FBD6B0096; Mon, 29 Apr 2024 18:45:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3F8366B0098; Mon, 29 Apr 2024 18:45:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1A2966B0095 for ; Mon, 29 Apr 2024 18:45:02 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id C161F140341 for ; Mon, 29 Apr 2024 22:45:01 +0000 (UTC) X-FDA: 82064051202.24.F3CFC2F Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf08.hostedemail.com (Postfix) with ESMTP id 30B12160014 for ; Mon, 29 Apr 2024 22:44:59 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=JTjkOLRZ; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf08.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714430700; 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:dkim-signature; bh=5n2rrgpLyVIJX1+QKss1cT1kREjQbq7BJIeXYE8zFfA=; b=OrQHRB8j3N9RnXys/OrAlQ98NT7FW9Nxy/tGfSmOSU5wWTN4AvbiLs95NAJuaohSagzE3m /iQziYZaIh08GcIEtLNpDV2Yv4d1ki8y3ssDafdov7AoPdBG1+KzKgrlbHFQKyoAxoh/KX TP5jjFkekugFp0GwdlnxDKjcjOmjqRU= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=JTjkOLRZ; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf08.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=sj@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714430700; a=rsa-sha256; cv=none; b=WR7BrJiUp1Gj4Nm2WxLy35fWWvVXMPWgYZJ4ZVtByWksYOOjI/BrDhgrhw4aitnVnmJpid NwrEONteV82QVWj9nJ0Q8QJ5t0GCQBuFJTLC2i6FpiHlh1CqHHepv0b1SP5OQhJvvJHYSv XK8Wt/WOQ8vYR6RFkLtQ8fK7E/W4Nuk= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5771261176; Mon, 29 Apr 2024 22:44:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D15BBC4AF1D; Mon, 29 Apr 2024 22:44:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714430699; bh=c5R6Q+jjynMcjdwz6qj4TecKkTHs1L5RszRXGVX69qM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JTjkOLRZE9RqeCYWNPbhtB3eMRNA1PWdYKagaygW3idDe5DF9DoUFJlKXawa1JTc7 FXrLTXWf1G5A4F6yyy7KeJSlzNz4sRCP3ri+aXxImbHD7+fxJ4QULrRGovvhbbB22y IoPHoE8GkyPAIekuzdETf1v6rweXYfpDa3g2ZtsDelCZCaWUQcZp9CzEPa9ZEEjIQ8 VARWTl2bWuYKJiHNVmIEnZwE2T0i2038cRvt7hIAQDIajci0r/UACkxR5HE5IAguPz GDxxFNCaFeHaJNGWszvbnwZN2khwABDsWrqnAZT4K+bOf98Vbw9C/VQiIcHNHeKgwQ Dg/OtCgjYSG2Q== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] mm/vmscan: remove ignore_references argument of reclaim_folio_list() Date: Mon, 29 Apr 2024 15:44:51 -0700 Message-Id: <20240429224451.67081-5-sj@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240429224451.67081-1-sj@kernel.org> References: <20240429224451.67081-1-sj@kernel.org> MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 30B12160014 X-Stat-Signature: kyys414jgu59tkteytmjnrm5eascn4fh X-Rspam-User: X-HE-Tag: 1714430699-271308 X-HE-Meta: U2FsdGVkX1+HS3v7L26h1LhJg+vWs6EtRFePU4TxIPCILKpPLCda+PWqavdbiFyUjGGoPLosSjIGaxVASItSAgaSn1Hf5AtO6hHaFBXPBqskX1z1RrNsT6EU7CGlE/Ce6lXVeuI4il+vksAngLxUvJCmRCWUZCvYAUE0nc53f4FeKcREraI4CSXZ8X/h8de+RRxrlMloAoYJB+UPjzJ30EqWZSWW9+GMYlpeJtU/GBskpn5dSMRLIg23Hw4cwC8TiwsrBAj1RHQGG54StZY8xS9neDOzsvT+FPBZN1XauhBO605I/WyyW/gs84nzKUZLdXHxFlcKHfRbmejX6ODrnpqZoxn/DeWcRefpGgeinudeFACMCldjKa3vjOvD3UZ0nPhBp6wSRaChVQWaFIMTSuGS+HAilSTZPEZLwCG4jLLt2LdTzKrgUTEO4LUSpbwvwqwlq3X4hC4nUbaK40X3YG2lVFWIP8Y0PtkRIAn/hWghdA8LtMzft89lpkxf6AtVwvMsxqyIw2aSvGfO21eD1J51CcxV3WaJjUzyqQKZMwdrZJC6Lf4pJrxgG2Vbiamh3Yc9BIwLd+vOcx6Sg1cetT8cw1pq278LdcHZvNBEWK0VyU0TlV1xnJnuq2u7QRfXgpyBDIfp59XsloKRK73H/soCb0b6U6MC8atERDGo93wb7R0sQVvQNTTXj3oBLL4iBklr2vC6duEkRKQR5WmsLMlqLAVWB7NC9smN6oGftTjiS0TxQX/dXqRyUHAOb+mA/Qh28hFXPIIhKsNLc3kU+AeeM8VUyxSeOpGOk1zcJWC64WVLRbCVku5e44t3Ahk7XqxbwA81R0fKtgqbpbEVbcWzRaDmzgxu5t4xOTz7xiG0uBLAKl4ngBVZFgvHiureJJbwnljELvBf307cgVNbw7A9z29prnGUB2OQ/hfqWDr3B/RbNQynMqEYXBRQVM/zXUebtasnppztPWhc3fN 3sNm/b41 zYFenjbe5VMOvA9OEvEGHxwQCD/dSnyHU7255WH6gPTQYlOR7jowEdjmYZfBh+jw0cwBBjc7De0vSnwHetclPPG08U+JYb9qQP9XRWnqJh3Uz6EOO00RPsw3lVFkSz9ympr4bCeYc/vlotyvAHvvwdqe1inRgVleGhHNn6MJDasAte66DoGWJuyxMYjpdPNADbRwexRhj66u5dM0CkZXjGxoTvfdYN326hfaraTeBn9IJcj5g4WkYFdA3YPNi6bT9Rzigb0DZr9CNIRa/ucPdaR5J6thmj5ob6+pr 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: List-Subscribe: List-Unsubscribe: All reclaim_folio_list() callers are passing 'true' for 'ignore_references' parameter. In other words, the parameter is not really being used. Simplify the code by removing the parameter. Signed-off-by: SeongJae Park --- mm/vmscan.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index fc9dd9a24739..6981a71c8ef0 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2126,8 +2126,7 @@ static void shrink_active_list(unsigned long nr_to_scan, } static unsigned int reclaim_folio_list(struct list_head *folio_list, - struct pglist_data *pgdat, - bool ignore_references) + struct pglist_data *pgdat) { struct reclaim_stat dummy_stat; unsigned int nr_reclaimed; @@ -2140,7 +2139,7 @@ static unsigned int reclaim_folio_list(struct list_head *folio_list, .no_demotion = 1, }; - nr_reclaimed = shrink_folio_list(folio_list, pgdat, &sc, &dummy_stat, ignore_references); + nr_reclaimed = shrink_folio_list(folio_list, pgdat, &sc, &dummy_stat, true); while (!list_empty(folio_list)) { folio = lru_to_folio(folio_list); list_del(&folio->lru); @@ -2172,12 +2171,11 @@ unsigned long reclaim_pages(struct list_head *folio_list) continue; } - nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid), - true); + nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid)); nid = folio_nid(lru_to_folio(folio_list)); } while (!list_empty(folio_list)); - nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid), true); + nr_reclaimed += reclaim_folio_list(&node_folio_list, NODE_DATA(nid)); memalloc_noreclaim_restore(noreclaim_flag);