From: yizhou.tang@shopee.com
To: neilb@suse.com, tj@kernel.org, wufengguang@huawei.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
tangyeechou@gmail.com, chunguang.xu@shopee.com,
yue.zhao@shopee.com, Tang Yizhou <yizhou.tang@shopee.com>
Subject: [PATCH] mm: Fix memcg writeback for rt tasks
Date: Tue, 4 Apr 2023 00:57:08 +0800 [thread overview]
Message-ID: <20230403165708.352841-1-yizhou.tang@shopee.com> (raw)
From: Tang Yizhou <yizhou.tang@shopee.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@suse.com>
CC: Tejun Heo <tj@kernel.org>
CC: Fengguang Wu <wufengguang@huawei.com>
Signed-off-by: Tang Yizhou <yizhou.tang@shopee.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
next reply other threads:[~2023-04-03 16:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 16:57 yizhou.tang [this message]
2023-04-11 4:36 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230403165708.352841-1-yizhou.tang@shopee.com \
--to=yizhou.tang@shopee.com \
--cc=chunguang.xu@shopee.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=neilb@suse.com \
--cc=tangyeechou@gmail.com \
--cc=tj@kernel.org \
--cc=wufengguang@huawei.com \
--cc=yue.zhao@shopee.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox