Message ID | 20230403165708.352841-1-yizhou.tang@shopee.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | mm: Fix memcg writeback for rt tasks | expand |
On Tue, 4 Apr 2023 00:57:08 +0800 yizhou.tang@shopee.com wrote: > 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. Why do you think this? > Fixes: a53eaff8c119 ("MM: increase safety margin provided by PF_LESS_THROTTLE") In what way does it fix it? Please describe the user-visible effects of this change.
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;