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>] [thread-next>] [day] [month] [year] [list]
Date:   Tue,  4 Apr 2023 00:57:08 +0800
From:   yizhou.tang@...pee.com
To:     neilb@...e.com, tj@...nel.org, wufengguang@...wei.com
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        tangyeechou@...il.com, chunguang.xu@...pee.com,
        yue.zhao@...pee.com, Tang Yizhou <yizhou.tang@...pee.com>
Subject: [PATCH] mm: Fix memcg writeback for rt tasks

From: Tang Yizhou <yizhou.tang@...pee.com>

Neil said he didn't know what was wanted for realtime in the commit
message of commit a37b0715ddf3 ("mm/writeback: replace PF_LESS_THROTTLE
with PF_LOCAL_THROTTLE"). I think we need to distinguish between the
global writeback and memcg writeback in domain_dirty_limits() for the
rt tasks.

Fixes: a53eaff8c119 ("MM: increase safety margin provided by PF_LESS_THROTTLE")
CC: NeilBrown <neilb@...e.com>
CC: Tejun Heo <tj@...nel.org>
CC: Fengguang Wu <wufengguang@...wei.com>
Signed-off-by: Tang Yizhou <yizhou.tang@...pee.com>
---
 mm/page-writeback.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 516b1aa247e8..7d92de73360e 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -419,8 +419,8 @@ static void domain_dirty_limits(struct dirty_throttle_control *dtc)
 		bg_thresh = thresh / 2;
 	tsk = current;
 	if (rt_task(tsk)) {
-		bg_thresh += bg_thresh / 4 + global_wb_domain.dirty_limit / 32;
-		thresh += thresh / 4 + global_wb_domain.dirty_limit / 32;
+		bg_thresh += bg_thresh / 4 + dtc_dom(dtc)->dirty_limit / 32;
+		thresh += thresh / 4 + dtc_dom(dtc)->dirty_limit / 32;
 	}
 	dtc->thresh = thresh;
 	dtc->bg_thresh = bg_thresh;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ