mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-30 02:21:15 +00:00
mm, compaction: rename COMPACT_PARTIAL to COMPACT_SUCCESS
COMPACT_PARTIAL has historically meant that compaction returned after doing some work without fully compacting a zone. It however didn't distinguish if compaction terminated because it succeeded in creating the requested high-order page. This has changed recently and now we only return COMPACT_PARTIAL when compaction thinks it succeeded, or the high-order watermark check in compaction_suitable() passes and no compaction needs to be done. So at this point we can make the return value clearer by renaming it to COMPACT_SUCCESS. The next patch will remove some redundant tests for success where compaction just returned COMPACT_SUCCESS. Link: http://lkml.kernel.org/r/20160810091226.6709-4-vbabka@suse.cz Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Tested-by: Lorenzo Stoakes <lstoakes@gmail.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: David Rientjes <rientjes@google.com> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
791cae9620
commit
cf378319d3
4 changed files with 12 additions and 12 deletions
|
@ -49,10 +49,10 @@ enum compact_result {
|
|||
COMPACT_CONTENDED,
|
||||
|
||||
/*
|
||||
* direct compaction partially compacted a zone and there might be
|
||||
* suitable pages
|
||||
* direct compaction terminated after concluding that the allocation
|
||||
* should now succeed
|
||||
*/
|
||||
COMPACT_PARTIAL,
|
||||
COMPACT_SUCCESS,
|
||||
};
|
||||
|
||||
struct alloc_context; /* in mm/internal.h */
|
||||
|
@ -88,7 +88,7 @@ static inline bool compaction_made_progress(enum compact_result result)
|
|||
* that the compaction successfully isolated and migrated some
|
||||
* pageblocks.
|
||||
*/
|
||||
if (result == COMPACT_PARTIAL)
|
||||
if (result == COMPACT_SUCCESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue