diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2023-05-19 14:39:56 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-06-09 16:25:36 -0700 |
commit | 511a69b27fe6c2d7312789bd9e2e40b00e3903ef (patch) | |
tree | 9976642a6036c00fd4b58ed0f3c3ad625674b604 /include/linux/compaction.h | |
parent | ecd8b2928f2efc7b678b361d51920c15b5ef3885 (diff) |
mm: compaction: simplify should_compact_retry()
The different branches for retry are unnecessarily complicated. There are
really only three outcomes: progress (retry n times), skipped (retry if
reclaim can help), failed (retry with higher priority).
Rearrange the branches and the retry counter to make it simpler.
[hannes@cmpxchg.org: restore behavior when hitting max_retries]
Link: https://lkml.kernel.org/r/20230602144705.GB161817@cmpxchg.org
Link: https://lkml.kernel.org/r/20230519123959.77335-3-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/compaction.h')
0 files changed, 0 insertions, 0 deletions