On Mon 27-11-17 16:54:39, Yafang Shao wrote: > 2017-11-27 16:52 GMT+08:00 Michal Hocko <mhocko@xxxxxxxx>: > > On Mon 27-11-17 16:49:34, Yafang Shao wrote: > >> 2017-11-27 16:37 GMT+08:00 Michal Hocko <mhocko@xxxxxxxx>: > >> > On Mon 27-11-17 16:32:42, Yafang Shao wrote: > >> >> 2017-11-27 16:29 GMT+08:00 Yafang Shao <laoar.shao@xxxxxxxxx>: > > [...] > >> >> > It will help us to find the error if we don't change these values like this. > >> >> > > >> >> > >> >> And actually it help us find another issue that when availble_memroy > >> >> is too small, the thresh and bg_thresh will be 0, that's absolutely > >> >> wrong. > >> > > >> > Why is it wrong? > >> > -- > >> > >> For example, the writeback threads will be wakeup on every write. > >> I don't think it is meaningful to wakeup the writeback thread when the > >> dirty pages is very low. > > > > Well, this is a corner situation when we are out of memory basically. > > Doing a wake up on the flusher is the least of your problem. So _why_ > > exactly is this is problem? > > -- > > Are you _sure_ this is the least of the problem on this corner situation ? I am not _sure_ and that is why I'm _asking_ _you_ and you seem to come up with reasons which don't make me really convinced. If we wake up flusher which have nothing to do they will simply back off. That is what have to do anyway because dirty data can be truncated at any time, right? > Why wakeup the bdi writeback ? why not just kill the program and flush > the date into the Disk when we do oom ? I really do not see how this is related to the discussion here. OOM killer doesn't flush anything. It kills a task and that is it. Moreover we do not flush any data from direct context at all. We simply rely on flushers to do the work. -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>