From nobody Fri Dec 19 03:07:17 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 43DF01465AE for ; Mon, 29 Apr 2024 22:44:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714430699; cv=none; b=GxMDa2X2Z9xF43oYLiPQtPfDAiRvIjefVJsWly3MX5NJissHS2OV999e7V+AK9FeptAmh+Kyhq8ow/pFMZ+i7xzL03Ni0TCX3tOBTlESJZN4D86KzqEqti4qDD5O1g8jna9bJcsMB8IJOGXYWO+0+4MpurpeQzVkrbIzfhtwIDY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714430699; c=relaxed/simple; bh=c5R6Q+jjynMcjdwz6qj4TecKkTHs1L5RszRXGVX69qM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gtwRX5HWvco0SB9J5suwieQ4Z1s3mbAiZ4KHrPQmQ9YnJYrgXK7BMuLXjOVhylRhRtZXaGGMAqH4WTkBig6Lo4UbEVOMle/8P0hQ+gfEdGo5fSKKFtMv6g/4YhF9493wQLmCoM6+HsHp5MokR4fy/T8JZ9x92TLQfYFQ9MxQd0o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JTjkOLRZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JTjkOLRZ" 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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_sc= an, } =20 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_he= ad *folio_list, .no_demotion =3D 1, }; =20 - nr_reclaimed =3D shrink_folio_list(folio_list, pgdat, &sc, &dummy_stat, i= gnore_references); + nr_reclaimed =3D shrink_folio_list(folio_list, pgdat, &sc, &dummy_stat, t= rue); while (!list_empty(folio_list)) { folio =3D lru_to_folio(folio_list); list_del(&folio->lru); @@ -2172,12 +2171,11 @@ unsigned long reclaim_pages(struct list_head *folio= _list) continue; } =20 - nr_reclaimed +=3D reclaim_folio_list(&node_folio_list, NODE_DATA(nid), - true); + nr_reclaimed +=3D reclaim_folio_list(&node_folio_list, NODE_DATA(nid)); nid =3D folio_nid(lru_to_folio(folio_list)); } while (!list_empty(folio_list)); =20 - nr_reclaimed +=3D reclaim_folio_list(&node_folio_list, NODE_DATA(nid), tr= ue); + nr_reclaimed +=3D reclaim_folio_list(&node_folio_list, NODE_DATA(nid)); =20 memalloc_noreclaim_restore(noreclaim_flag); =20 --=20 2.39.2