forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm, compaction: direct freepage allocation for async direct compaction
The goal of direct compaction is to quickly make a high-order page available for the pending allocation. The free page scanner can add significant latency when searching for migration targets, although to succeed the compaction, the only important limit on the target free pages is that they must not come from the same order-aligned block as the migrated pages. This patch therefore makes direct async compaction allocate freepages directly from freelists. Pages that do come from the same block (which we cannot simply exclude from the freelist allocation) are put on separate list and released only after migration to allow them to merge. In addition to reduced stall, another advantage is that we split larger free pages for migration targets only when smaller pages are depleted, while the free scanner can split pages up to (order - 1) as it encouters them. However, this approach likely sacrifices some of the long-term anti-fragmentation features of a thorough compaction, so we limit the direct allocation approach to direct async compaction. For observational purposes, the patch introduces two new counters to /proc/vmstat. compact_free_direct_alloc counts how many pages were allocated directly without scanning, and compact_free_direct_miss counts the subset of these allocations that were from the wrong range and had to be held on the separate list. Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Rik van Riel <riel@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
- Loading branch information
1 parent
e4e3577
commit 34939e8
Showing
5 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters