diff options
author | Zi Yan <ziy@nvidia.com> | 2020-11-13 22:51:43 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-11-14 11:26:03 -0800 |
commit | d20bdd571ee5c9966191568527ecdb1bd4b52368 (patch) | |
tree | d34960496812c3fee82d7fd56136ebe5638ac5a6 /Documentation/bpf/btf.rst | |
parent | 38935861d85a4d9a353d1dd5a156c97700e2765d (diff) | |
download | linux-d20bdd571ee5c9966191568527ecdb1bd4b52368.tar.gz linux-d20bdd571ee5c9966191568527ecdb1bd4b52368.tar.bz2 linux-d20bdd571ee5c9966191568527ecdb1bd4b52368.zip |
mm/compaction: stop isolation if too many pages are isolated and we have pages to migrate
In isolate_migratepages_block, if we have too many isolated pages and
nr_migratepages is not zero, we should try to migrate what we have
without wasting time on isolating.
In theory it's possible that multiple parallel compactions will cause
too_many_isolated() to become true even if each has isolated less than
COMPACT_CLUSTER_MAX, and loop forever in the while loop. Bailing
immediately prevents that.
[vbabka@suse.cz: changelog addition]
Fixes: 1da2f328fa64 (“mm,thp,compaction,cma: allow THP migration for CMA allocations”)
Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@vger.kernel.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Yang Shi <shy828301@gmail.com>
Link: https://lkml.kernel.org/r/20201030183809.3616803-2-zi.yan@sent.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/bpf/btf.rst')
0 files changed, 0 insertions, 0 deletions