On Wed 17-12-14 21:20:19, Johannes Weiner wrote: > On Wed, Dec 17, 2014 at 02:28:37PM -0800, David Rientjes wrote: [...] > > Why remove 'rebalance'? In the situation where direct reclaim does free > > memory and we're waiting on writeback (no call to the oom killer is made), > > it doesn't seem necessary to recalculate classzone_idx. > > > > Additionally, we never called wait_iff_congested() before when the oom > > killer freed memory. This is a no-op if the preferred_zone isn't waiting > > on writeback, but seems pointless if we just freed memory by calling the > > oom killer. > > Why keep all these undocumented assumptions in the code? It's really > simple: if we retry freeing memory (LRU reclaim or OOM kills), we wait > for congestion, kick kswapd, re-evaluate the current task state, > regardless of which reclaim method did what or anything at all. It's > a slowpath, so there is no reason to not keep this simple and robust. Agreed, the less subtle loops via labels we have the better. -- 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>