From nobody Thu Dec 18 18:00:23 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 E776F2561F; Mon, 29 Apr 2024 22:44:57 +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=1714430698; cv=none; b=hB+H8CsmXfdKiObRlUcifHJhmv41gFOE3n1uAanFA7Rr31jbHDxvuMM9v1T1DeXg83BfA5ftYuCW3WG8TMVc+0OIPpCQmZMM2iGgjSoFEQUMuy6RyIod799blz6+gmrQ+8LfaL/n8nOpS5u3yZpidmbyiuFdtCwfWZJFxcIGpVQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714430698; c=relaxed/simple; bh=mENk5G88cYd3MXH884J6VW2xQ20zMe3RoStwvahKaVk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ENXXgzRVRvJ2Tpbx+VEJh1TnLpsUIDyTfxTagMfCobS32jTN+rPafo+siuKzJmg2mnpsyvaXo1PdlyBAtGdJRUOD8QwXtHTFFlU3KgpI+uHdbVbhN+NJx07SKbPp8GCnEsHUgHGNIPC5lmLf2js2lRxXkY5ULpfosi0QjhlEta8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lOVb+7he; 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="lOVb+7he" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 205F9C4AF17; Mon, 29 Apr 2024 22:44:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714430697; bh=mENk5G88cYd3MXH884J6VW2xQ20zMe3RoStwvahKaVk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lOVb+7heQ3WwXvk0thHVAc7hGwVjDLKdY428VNMOlvAawCnraFMZ0bP6PGHp99LhZ hvAu47Dmw1GvdyEgaauwyfO6N1mvn5cAfOMnRlhjGrlakozgB3teDCh7qZky88clEn 3bSqWAtgJ5UuXhKIV3wgyZ6ZaOgT93do2h5RpKPP3eFkhxeFFs3AYTYu3RdK6uGcgY Ex7qzWG/3oXzRskceqor3/3YlKh7M6lTHaDwoMLaD7YEIN5LrUFKlR6yZAB7C6DOy3 FK6X8WGP22G23fWyeHJ2nGSg1JoqWGHMnnQ/A6W9pOFHOJ2Gwk3hO3iwqJBK+Ixfhs 9PFN4V67WZj1g== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] mm/damon/paddr: avoid unnecessary page level access check for pageout DAMOS action Date: Mon, 29 Apr 2024 15:44:48 -0700 Message-Id: <20240429224451.67081-2-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" 'pageout' DAMOS action implementation of 'paddr' asks reclaim_pages() to do the page level access check. User could ask DAMOS to do the page level access check on its own using 'young page' type DAMOS filter. In the case, pageout DAMOS action unnecessarily asks reclaim_pages() to do the check again. Ask the page level access check only if the scheme is not having the filter. Signed-off-by: SeongJae Park --- mm/damon/paddr.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index 5685ba485097..d5f2f7ddf863 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -244,6 +244,16 @@ static unsigned long damon_pa_pageout(struct damon_reg= ion *r, struct damos *s) { unsigned long addr, applied; LIST_HEAD(folio_list); + bool ignore_references =3D false; + struct damos_filter *filter; + + /* respect user's page level reference check handling request */ + damos_for_each_filter(filter, s) { + if (filter->type =3D=3D DAMOS_FILTER_TYPE_YOUNG) { + ignore_references =3D true; + break; + } + } =20 for (addr =3D r->ar.start; addr < r->ar.end; addr +=3D PAGE_SIZE) { struct folio *folio =3D damon_get_folio(PHYS_PFN(addr)); @@ -265,7 +275,7 @@ static unsigned long damon_pa_pageout(struct damon_regi= on *r, struct damos *s) put_folio: folio_put(folio); } - applied =3D reclaim_pages(&folio_list, false); + applied =3D reclaim_pages(&folio_list, ignore_references); cond_resched(); return applied * PAGE_SIZE; } --=20 2.39.2 From nobody Thu Dec 18 18:00:23 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 311B92E3E8; Mon, 29 Apr 2024 22:44:58 +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=1714430698; cv=none; b=F5Irr09iDScoNZnFRsd8Vwo9l8W+8sNMAY9S+I1gOF97++YTdR7M/kLebIDwwph8YalL50TZqVtwuvdTnCNzL0mk35DjcJBYxXhVXvBxmBqTF98jIT0g/hSs0fDdPGG9zdD/yQXqn3BkGGHXtbScUMFjD/hDpgigE3PKSFu56mI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714430698; c=relaxed/simple; bh=AH03oSjW6IlmpdP3TkCfshDEgNgfP3nlydglW7MDGsQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FEFrpd2/C0+nlY6onlGXS8jFjPT1Gkkr++lgsCMU0+RKFkPmpUz1MG4ykhaEalPKV5RitOyIOfrp/NXSvU9W5ILGJCITs1HufWfEkn1MAZY+rbfZdtNPUx7CKzb7uSUJg7SMMVwRVVmnEpO2pBgq70IDw/xbX9i9Q1d/DmYcKCE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ny6osMgl; 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="ny6osMgl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC6FFC4AF1B; Mon, 29 Apr 2024 22:44:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714430698; bh=AH03oSjW6IlmpdP3TkCfshDEgNgfP3nlydglW7MDGsQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ny6osMgl45sRK1kTdOdB6auEHpoy9gyum6G8OViYWxx5YHF2tI09BaNYiUiQcM1XE CwsnkaXlQWiDC4fyWrn1I+XwFkdEwvX5dKhuKg/nm+9bdGn0y7PKJAyKCFUuyklO9D dvDeBNzrSWTFQOx08wMh6KdfBsiQbT+oMRUzz0/87a37KlHyp2AjnGZqCxPAsg0LSU NF6ze2KTg100UJ2SoPwg/gpn6iM4fjetutiBmcJ6PYtj9f3UKD3nPGU5Q9DHSrgW74 rFUA74TFGHpHWd8ilXj58w3CIyNERfRMxsz02cOVqB4FhMBaBy9mceOVkTlgZpeCax FjpYOOiaKPSjQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] mm/damon/paddr: do page level access check for pageout DAMOS action on its own Date: Mon, 29 Apr 2024 15:44:49 -0700 Message-Id: <20240429224451.67081-3-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" 'pageout' DAMOS action implementation of 'paddr' DAMON operations set asks reclaim_pages() to do page level access check if the user is not asking DAMOS to do that on its own. Simplify the logic by making the check always be done by 'paddr'. Signed-off-by: SeongJae Park --- mm/damon/paddr.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index d5f2f7ddf863..974edef1740d 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -244,16 +244,22 @@ static unsigned long damon_pa_pageout(struct damon_re= gion *r, struct damos *s) { unsigned long addr, applied; LIST_HEAD(folio_list); - bool ignore_references =3D false; + bool install_young_filter =3D true; struct damos_filter *filter; =20 - /* respect user's page level reference check handling request */ + /* check access in page level again by default */ damos_for_each_filter(filter, s) { if (filter->type =3D=3D DAMOS_FILTER_TYPE_YOUNG) { - ignore_references =3D true; + install_young_filter =3D false; break; } } + if (install_young_filter) { + filter =3D damos_new_filter(DAMOS_FILTER_TYPE_YOUNG, true); + if (!filter) + return 0; + damos_add_filter(s, filter); + } =20 for (addr =3D r->ar.start; addr < r->ar.end; addr +=3D PAGE_SIZE) { struct folio *folio =3D damon_get_folio(PHYS_PFN(addr)); @@ -275,7 +281,9 @@ static unsigned long damon_pa_pageout(struct damon_regi= on *r, struct damos *s) put_folio: folio_put(folio); } - applied =3D reclaim_pages(&folio_list, ignore_references); + if (install_young_filter) + damos_destroy_filter(filter); + applied =3D reclaim_pages(&folio_list, true); cond_resched(); return applied * PAGE_SIZE; } --=20 2.39.2 From nobody Thu Dec 18 18:00:23 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 B8D807BB1A; Mon, 29 Apr 2024 22:44:58 +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=1714430698; cv=none; b=nkVNEzJjW48mwmO9b5FkSuhMWyh3vBkNuyLgNWJm2BoTy/pWOupUWf7LB7zHSt93R42SaYPVhlx0gLTPxwGnPKeEYW7+yGKNfpt/SDnoLtkFhRVAh+mSSVhndK4itzbSe7nOFQgPimw8lS+Y/O6/qzdsZhYxPC8fUxTA5pJrtbM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714430698; c=relaxed/simple; bh=rwwV4wTGLuB7cXfIuHMVaw/1/iqBkA9IvJM9bkgx3iA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VP/cW25N8OKlHXgdHlWLzPcLqPe12lNNvwdcjFjcKhREDSDK1M6bJapcinq4os2PnidbLOd5drZWYLuXrxOcM2guYMyaX6wnbcmw8yMLD696R2Pqc58VnzjTH/0rjSgmleHTH6xNC0ADoxtsYyhsmHZJPiLTKkz9EZ2vIR36swc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DbJ0bdvv; 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="DbJ0bdvv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 449E6C4AF1A; 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=1714430698; bh=rwwV4wTGLuB7cXfIuHMVaw/1/iqBkA9IvJM9bkgx3iA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DbJ0bdvvJr2AhyvwGW00oQOrnMQxpSdiFdku3EzCB5Pf8qz+KnEJFsIAVPLJBn7LI fOmyoYPY5MRuwZBCR4WOPYYORsXzorDi6hZCCTY3ru1Roc99UOGEbt5PTsJSlX/pnH 2redK7kxVZ2sOhiba6ZfAHri7YUTXSUDxn3qDmziId7BKHORNZ9aiMm8QskuSYduu9 MRbV+SnE0GV7XVoDV142dQ3T5d8IXuFLGuaud4T5UEBhwFbJAeAYHQgYOzW23RlSV8 qlmXHL6C1cICKky/VRmu1IKaIVZPSOHqyfco/70bB7Psw5rlpb5iCxgzlWwiBiMrfN cRbHEA0E3zluQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] mm/vmscan: remove ignore_references argument of reclaim_pages() Date: Mon, 29 Apr 2024 15:44:50 -0700 Message-Id: <20240429224451.67081-4-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_pages() callers are setting 'ignore_references' parameter 'true'. In other words, the parameter is not really being used. Remove the argument to make it simple. Signed-off-by: SeongJae Park --- mm/damon/paddr.c | 2 +- mm/internal.h | 2 +- mm/madvise.c | 4 ++-- mm/vmscan.c | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c index 974edef1740d..18797c1b419b 100644 --- a/mm/damon/paddr.c +++ b/mm/damon/paddr.c @@ -283,7 +283,7 @@ static unsigned long damon_pa_pageout(struct damon_regi= on *r, struct damos *s) } if (install_young_filter) damos_destroy_filter(filter); - applied =3D reclaim_pages(&folio_list, true); + applied =3D reclaim_pages(&folio_list); cond_resched(); return applied * PAGE_SIZE; } diff --git a/mm/internal.h b/mm/internal.h index c5552d35d995..b2c75b12014e 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -1052,7 +1052,7 @@ extern unsigned long __must_check vm_mmap_pgoff(stru= ct file *, unsigned long, unsigned long, unsigned long); =20 extern void set_pageblock_order(void); -unsigned long reclaim_pages(struct list_head *folio_list, bool ignore_refe= rences); +unsigned long reclaim_pages(struct list_head *folio_list); unsigned int reclaim_clean_pages_from_list(struct zone *zone, struct list_head *folio_list); /* The ALLOC_WMARK bits are used as an index to zone->watermark */ diff --git a/mm/madvise.c b/mm/madvise.c index c49fef453491..a77893462b92 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -423,7 +423,7 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd, huge_unlock: spin_unlock(ptl); if (pageout) - reclaim_pages(&folio_list, true); + reclaim_pages(&folio_list); return 0; } =20 @@ -547,7 +547,7 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd, pte_unmap_unlock(start_pte, ptl); } if (pageout) - reclaim_pages(&folio_list, true); + reclaim_pages(&folio_list); cond_resched(); =20 return 0; diff --git a/mm/vmscan.c b/mm/vmscan.c index 49bd94423961..fc9dd9a24739 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2150,7 +2150,7 @@ static unsigned int reclaim_folio_list(struct list_he= ad *folio_list, return nr_reclaimed; } =20 -unsigned long reclaim_pages(struct list_head *folio_list, bool ignore_refe= rences) +unsigned long reclaim_pages(struct list_head *folio_list) { int nid; unsigned int nr_reclaimed =3D 0; @@ -2173,11 +2173,11 @@ unsigned long reclaim_pages(struct list_head *folio= _list, bool ignore_references } =20 nr_reclaimed +=3D reclaim_folio_list(&node_folio_list, NODE_DATA(nid), - ignore_references); + true); 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), ig= nore_references); + nr_reclaimed +=3D reclaim_folio_list(&node_folio_list, NODE_DATA(nid), tr= ue); =20 memalloc_noreclaim_restore(noreclaim_flag); =20 --=20 2.39.2 From nobody Thu Dec 18 18:00:23 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