Thread (24 messages) 24 messages, 4 authors, 2016-09-23

Re: [PATCH 2/4] mm, compaction: more reliably increase direct compaction priority

From: Vlastimil Babka <hidden>
Date: 2016-09-22 12:51:54
Also in: lkml
Subsystem: memory management, memory management - page allocator, the rest · Maintainers: Andrew Morton, Vlastimil Babka, Linus Torvalds

On 09/21/2016 07:13 PM, Michal Hocko wrote:
On Tue 06-09-16 15:52:56, Vlastimil Babka wrote:
[...]
quoted
@@ -3204,6 +3199,15 @@ should_compact_retry(struct alloc_context *ac, int order, int alloc_flags,
 	if (compaction_retries <= max_retries)
 		return true;
 
+	/*
+	 * Make sure there is at least one attempt at the highest priority
+	 * if we exhausted all retries at the lower priorities
+	 */
+check_priority:
+	if (*compact_priority > MIN_COMPACT_PRIORITY) {
+		(*compact_priority)--;
+		return true;
Don't we want to reset compaction_retries here? Otherwise we can consume
all retries on the lower priorities.
Good point, patch-fix below.
Other than that it looks good to me. With that you can add
Acked-by: Michal Hocko <mhocko@suse.com>
Thanks!
 
quoted
+	}
 	return false;
 }
 #else
----8<----
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help