Revert "mm/page-writeback.c: print a warning if the vm dirtiness settings are illogical"
This reverts commit0f6d24f878
("mm/page-writeback.c: print a warning if the vm dirtiness settings are illogical") because it causes false positive warnings during OOM situations as noticed by Tetsuo Handa: Node 0 active_anon:3525940kB inactive_anon:8372kB active_file:216kB inactive_file:1872kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:2504kB dirty:52kB writeback:0kB shmem:8660kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 636928kB writeback_tmp:0kB unstable:0kB all_unreclaimable? yes Node 0 DMA free:14848kB min:284kB low:352kB high:420kB active_anon:992kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15988kB managed:15904kB mlocked:0kB kernel_stack:0kB pagetables:24kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB lowmem_reserve[]: 0 2687 3645 3645 Node 0 DMA32 free:53004kB min:49608kB low:62008kB high:74408kB active_anon:2712648kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129216kB managed:2773132kB mlocked:0kB kernel_stack:96kB pagetables:5096kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB lowmem_reserve[]: 0 0 958 958 Node 0 Normal free:17140kB min:17684kB low:22104kB high:26524kB active_anon:812300kB inactive_anon:8372kB active_file:1228kB inactive_file:1868kB unevictable:0kB writepending:52kB present:1048576kB managed:981224kB mlocked:0kB kernel_stack:3520kB pagetables:8552kB bounce:0kB free_pcp:120kB local_pcp:120kB free_cma:0kB lowmem_reserve[]: 0 0 0 0 [...] Out of memory: Kill process 8459 (a.out) score 999 or sacrifice child Killed process 8459 (a.out) total-vm:4180kB, anon-rss:88kB, file-rss:0kB, shmem-rss:0kB oom_reaper: reaped process 8459 (a.out), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB vm direct limit must be set greater than background limit. The problem is that both thresh and bg_thresh will be 0 if available_memory is less than 4 pages when evaluating global_dirtyable_memory. While this might be worked around the whole point of the warning is dubious at best. We do rely on admins to do sensible things when changing tunable knobs. Dirty memory writeback knobs are not any special in that regards so revert the warning rather than adding more hacks to work this around. Debugged by Yafang Shao. Link: http://lkml.kernel.org/r/20171127091939.tahb77nznytcxw55@dhcp22.suse.cz Fixes:0f6d24f878
("mm/page-writeback.c: print a warning if the vm dirtiness settings are illogical") Signed-off-by: Michal Hocko <mhocko@suse.com> Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Yafang Shao <laoar.shao@gmail.com> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
6ea8d958a2
commit
90daf3062f
|
@ -158,10 +158,6 @@ Note: the minimum value allowed for dirty_bytes is two pages (in bytes); any
|
||||||
value lower than this limit will be ignored and the old configuration will be
|
value lower than this limit will be ignored and the old configuration will be
|
||||||
retained.
|
retained.
|
||||||
|
|
||||||
Note: the value of dirty_bytes also must be set greater than
|
|
||||||
dirty_background_bytes or the amount of memory corresponding to
|
|
||||||
dirty_background_ratio.
|
|
||||||
|
|
||||||
==============================================================
|
==============================================================
|
||||||
|
|
||||||
dirty_expire_centisecs
|
dirty_expire_centisecs
|
||||||
|
@ -181,9 +177,6 @@ generating disk writes will itself start writing out dirty data.
|
||||||
|
|
||||||
The total available memory is not equal to total system memory.
|
The total available memory is not equal to total system memory.
|
||||||
|
|
||||||
Note: dirty_ratio must be set greater than dirty_background_ratio or
|
|
||||||
ratio corresponding to dirty_background_bytes.
|
|
||||||
|
|
||||||
==============================================================
|
==============================================================
|
||||||
|
|
||||||
dirty_writeback_centisecs
|
dirty_writeback_centisecs
|
||||||
|
|
|
@ -433,11 +433,8 @@ static void domain_dirty_limits(struct dirty_throttle_control *dtc)
|
||||||
else
|
else
|
||||||
bg_thresh = (bg_ratio * available_memory) / PAGE_SIZE;
|
bg_thresh = (bg_ratio * available_memory) / PAGE_SIZE;
|
||||||
|
|
||||||
if (unlikely(bg_thresh >= thresh)) {
|
if (bg_thresh >= thresh)
|
||||||
pr_warn("vm direct limit must be set greater than background limit.\n");
|
|
||||||
bg_thresh = thresh / 2;
|
bg_thresh = thresh / 2;
|
||||||
}
|
|
||||||
|
|
||||||
tsk = current;
|
tsk = current;
|
||||||
if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk)) {
|
if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk)) {
|
||||||
bg_thresh += bg_thresh / 4 + global_wb_domain.dirty_limit / 32;
|
bg_thresh += bg_thresh / 4 + global_wb_domain.dirty_limit / 32;
|
||||||
|
|
Loading…
Reference in New Issue