aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-cmp.c
diff options
context:
space:
mode:
authorVlastimil Babka <[email protected]>2019-09-23 15:37:32 -0700
committerLinus Torvalds <[email protected]>2019-09-24 15:54:10 -0700
commit494330855641269c8a49f1580f0d4e2ead693245 (patch)
tree4f168ac383f3764c83881643037ee70256bff225 /lib/mpi/mpi-cmp.c
parent5ee04716c46ce58989b1256a98af1af89f385db8 (diff)
mm, compaction: raise compaction priority after it withdrawns
Mike Kravetz reports that "hugetlb allocations could stall for minutes or hours when should_compact_retry() would return true more often then it should. Specifically, this was in the case where compact_result was COMPACT_DEFERRED and COMPACT_PARTIAL_SKIPPED and no progress was being made." The problem is that the compaction_withdrawn() test in should_compact_retry() includes compaction outcomes that are only possible on low compaction priority, and results in a retry without increasing the priority. This may result in furter reclaim, and more incomplete compaction attempts. With this patch, compaction priority is raised when possible, or should_compact_retry() returns false. The COMPACT_SKIPPED result doesn't really fit together with the other outcomes in compaction_withdrawn(), as that's a result caused by insufficient order-0 pages, not due to low compaction priority. With this patch, it is moved to a new compaction_needs_reclaim() function, and for that outcome we keep the current logic of retrying if it looks like reclaim will be able to help. Link: http://lkml.kernel.org/r/[email protected] Reported-by: Mike Kravetz <[email protected]> Signed-off-by: Vlastimil Babka <[email protected]> Signed-off-by: Mike Kravetz <[email protected]> Tested-by: Mike Kravetz <[email protected]> Cc: Hillf Danton <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Michal Hocko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions