mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
mm/page-writeback.c: print a warning if the vm dirtiness settings are illogical
The vm direct limit setting must be set greater than vm background limit setting. Otherwise print a warning to help the operator to figure out that the vm dirtiness settings is in illogical state. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Yafang Shao <[email protected]> Cc: Jan Kara <[email protected]> Cc: Michal Hocko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
66e8b438bd
commit
0f6d24f878
2 changed files with 11 additions and 1 deletions
|
|
@ -433,8 +433,11 @@ static void domain_dirty_limits(struct dirty_throttle_control *dtc)
|
|||
else
|
||||
bg_thresh = (bg_ratio * available_memory) / PAGE_SIZE;
|
||||
|
||||
if (bg_thresh >= thresh)
|
||||
if (unlikely(bg_thresh >= thresh)) {
|
||||
pr_warn("vm direct limit must be set greater than background limit.\n");
|
||||
bg_thresh = thresh / 2;
|
||||
}
|
||||
|
||||
tsk = current;
|
||||
if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk)) {
|
||||
bg_thresh += bg_thresh / 4 + global_wb_domain.dirty_limit / 32;
|
||||
|
|
|
|||
Loading…
Reference in a new issue