mm/page-writeback.c: print a warning if the vm dirtiness settings are illogical
[sfrench/cifs-2.6.git] / mm / page-writeback.c
index 76a43c17761b4e0735e18d2aa65f536b66aa0edb..768fe4e37e6aedcb1b5f98633b8c5ad65aab1db3 100644 (file)
@@ -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;