On 19.08.2016 01:26, Michal Hocko wrote: > >>> That being said, let's wait for the feedback on this patch + linux-next. >>> If it works out I will send a stable 4.7 patch which drops compaction >>> feedback from should_compact_retry (turn it to the !COMPACTION version) >>> so that 4.7 users do not suffer from the premature OOM and will ask >>> Andrew to sneak the compaction patches to 4.8 as they fix a real issue >>> and the risk is not really high. >> Agreed. >> >>> Acked-by: Michal Hocko >> Thanks! >> >> -----8<----- >> >From c4da7022e85e52f5463055cdc474656652e7a504 Mon Sep 17 00:00:00 2001 >> From: Vlastimil Babka >> Date: Fri, 19 Aug 2016 09:40:31 +0200 >> Subject: [PATCH] mm, compaction: add the ultimate direct compaction >> priority-fix >> >> Use the MIN_COMPACT_PRIORITY alias instead of COMPACT_PRIO_SYNC_FULL to >> disable heuristics "because this would be easier to follow and it would be >> easier for future changes", per Michal. >> >> Suggested-by: Michal Hocko >> Signed-off-by: Vlastimil Babka >> Fixes: mmotm mm-compaction-add-the-ultimate-direct-compaction-priority.patch > I guess Fixes is a bit misleading. This is not a bug it is a cleanup > patch. > > Acked-by: Michal Hocko > > Thanks! > >> --- >> mm/compaction.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/mm/compaction.c b/mm/compaction.c >> index ae4f40afcca1..3e35fce2cace 100644 >> --- a/mm/compaction.c >> +++ b/mm/compaction.c >> @@ -1644,8 +1644,8 @@ static enum compact_result compact_zone_order(struct zone *zone, int order, >> .alloc_flags = alloc_flags, >> .classzone_idx = classzone_idx, >> .direct_compaction = true, >> - .whole_zone = (prio == COMPACT_PRIO_SYNC_FULL), >> - .ignore_skip_hint = (prio == COMPACT_PRIO_SYNC_FULL) >> + .whole_zone = (prio == MIN_COMPACT_PRIORITY), >> + .ignore_skip_hint = (prio == MIN_COMPACT_PRIORITY) >> }; >> INIT_LIST_HEAD(&cc.freepages); >> INIT_LIST_HEAD(&cc.migratepages); >> @@ -1691,7 +1691,7 @@ enum compact_result try_to_compact_pages(gfp_t gfp_mask, unsigned int order, >> ac->nodemask) { >> enum compact_result status; >> >> - if (prio > COMPACT_PRIO_SYNC_FULL >> + if (prio > MIN_COMPACT_PRIORITY >> && compaction_deferred(zone, order)) { >> rc = max_t(enum compact_result, COMPACT_DEFERRED, rc); >> continue; >> -- >> 2.9.2 >> >> This change was in linux-next-20160823 so I ran it unmodified. I did get an OOM, see attached. Thanks, Ralf-Peter ---------------------------------------------------------------------- The information contained in this transmission may be confidential. Any disclosure, copying, or further distribution of confidential information is not permitted unless such privilege is explicitly granted in writing by Quantum. Quantum reserves the right to have electronic communications, including email and attachments, sent across its networks filtered through anti virus and spam software programs and retain such messages in order to comply with applicable data security and retention requirements. Quantum is not responsible for the proper and complete transmission of the substance of this communication or for any delay in its receipt.