From 189382f7a338c02b448ab27e1d5566e052165dc8 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Wed, 7 Dec 2016 16:30:11 -0300 Subject: Linux-libre 4.8.12-gnu --- mm/page_alloc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mm/page_alloc.c') diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a2214c64e..7401e9960 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3161,6 +3161,16 @@ should_compact_retry(struct alloc_context *ac, unsigned int order, int alloc_fla if (!order || order > PAGE_ALLOC_COSTLY_ORDER) return false; +#ifdef CONFIG_COMPACTION + /* + * This is a gross workaround to compensate a lack of reliable compaction + * operation. We cannot simply go OOM with the current state of the compaction + * code because this can lead to pre mature OOM declaration. + */ + if (order <= PAGE_ALLOC_COSTLY_ORDER) + return true; +#endif + /* * There are setups with compaction disabled which would prefer to loop * inside the allocator rather than hit the oom killer prematurely. -- cgit v1.2.3-54-g00ecf