lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220813080757.59131-1-yang.yang29@zte.com.cn>
Date:   Sat, 13 Aug 2022 08:07:58 +0000
From:   cgel.zte@...il.com
To:     akpm@...ux-foundation.org, iamjoonsoo.kim@....com
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Yang Yang <yang.yang29@....com.cn>,
        CGEL ZTE <cgel.zte@...il.com>
Subject: [PATCH] mm/vmscan: make the annotations of refaults code at the right place

From: Yang Yang <yang.yang29@....com.cn>

After patch "mm/workingset: prepare the workingset detection
infrastructure for anon LRU", we can handle the refaults of
anonymous pages too. So the annotations of refaults should
cover both of anonymous pages and file pages.

Signed-off-by: Yang Yang <yang.yang29@....com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@...il.com>
---
 mm/vmscan.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 428f8fa60331..bb993b21953d 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3228,6 +3228,11 @@ static void shrink_node(pg_data_t *pgdat, struct scan_control *sc)
 	if (!sc->force_deactivate) {
 		unsigned long refaults;
 
+		/*
+		 * When refaults are being observed, it means a new
+		 * workingset is being established. Deactivate to get
+		 * rid of any stale active pages quickly.
+		 */
 		refaults = lruvec_page_state(target_lruvec,
 				WORKINGSET_ACTIVATE_ANON);
 		if (refaults != target_lruvec->refaults[WORKINGSET_ANON] ||
@@ -3236,11 +3241,6 @@ static void shrink_node(pg_data_t *pgdat, struct scan_control *sc)
 		else
 			sc->may_deactivate &= ~DEACTIVATE_ANON;
 
-		/*
-		 * When refaults are being observed, it means a new
-		 * workingset is being established. Deactivate to get
-		 * rid of any stale active pages quickly.
-		 */
 		refaults = lruvec_page_state(target_lruvec,
 				WORKINGSET_ACTIVATE_FILE);
 		if (refaults != target_lruvec->refaults[WORKINGSET_FILE] ||
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ