On 03/08/2016 01:22 PM, Michal Hocko wrote: >> Thanks. >> >>> A more important question is whether the criteria I have chosen are >>> reasonable and reasonably independent on the particular implementation >>> of the compaction. I still cannot convince myself about the convergence >>> here. Is it possible that the compaction would keep returning >>> compact_result <= COMPACT_CONTINUE while not making any progress at all? >> >> Theoretically, if reclaim/compaction suitability decisions and >> allocation attempts didn't match the watermark checks, including the >> alloc_flags and classzone_idx parameters. Possible scenarios: >> >> - reclaim thinks compaction has enough to proceed, but compaction thinks >> otherwise and returns COMPACT_SKIPPED >> - compaction thinks it succeeded and returns COMPACT_PARTIAL, but >> allocation attempt fails >> - and perhaps some other combinations > > But that might happen right now as well so it wouldn't be a regression, > right?
Maybe, somehow, I didn't study closely how the retry decisions work. Your patch adds another way to retry so it's theoretically more dangerous. Just hinting at what to possibly check (the watermark checks) :)