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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211210003019.1481269-1-minchan@kernel.org>
Date:   Thu,  9 Dec 2021 16:30:19 -0800
From:   Minchan Kim <minchan@...nel.org>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Jens Axboe <axboe@...nel.dk>, linux-mm <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Suren Baghdasaryan <surenb@...gle.com>,
        John Dias <joaodias@...gle.com>,
        Minchan Kim <minchan@...nel.org>
Subject: [PATCH] mm/madvise: pageout under plugging

Likewise shrink_lruvec[1], madvise_pageout could get the benefit
from per-task block plug.

[1] 3da367c3e5fc, vmscan: add block plug for page reclaim
Signed-off-by: Minchan Kim <minchan@...nel.org>
---
 mm/vmscan.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index fb9584641ac7..cf11113f6adb 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2556,6 +2556,7 @@ unsigned long reclaim_pages(struct list_head *page_list)
 	struct reclaim_stat dummy_stat;
 	struct page *page;
 	unsigned int noreclaim_flag;
+	struct blk_plug plug;
 	struct scan_control sc = {
 		.gfp_mask = GFP_KERNEL,
 		.may_writepage = 1,
@@ -2564,6 +2565,7 @@ unsigned long reclaim_pages(struct list_head *page_list)
 		.no_demotion = 1,
 	};
 
+	blk_start_plug(&plug);
 	noreclaim_flag = memalloc_noreclaim_save();
 
 	while (!list_empty(page_list)) {
@@ -2603,6 +2605,8 @@ unsigned long reclaim_pages(struct list_head *page_list)
 	}
 
 	memalloc_noreclaim_restore(noreclaim_flag);
+	blk_finish_plug(&plug);
+
 
 	return nr_reclaimed;
 }
-- 
2.34.1.173.g76aa8bc2d0-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ