mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
mm: improve documentation of page_order
Developers occasionally try and optimise PFN scanners by using page_order but miss that in general it requires zone->lock. This has happened twice for compaction.c and rejected both times. This patch clarifies the documentation of page_order and adds a note to compaction.c why page_order is not used. [[email protected]: tweaks] [[email protected]: Corrected a page_zone(page)->lock reference] Signed-off-by: Mel Gorman <[email protected]> Acked-by: Rafael Aquini <[email protected]> Acked-by: Minchan Kim <[email protected]> Cc: Laura Abbott <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
0eef615665
commit
6c14466cc0
2 changed files with 9 additions and 4 deletions
|
|
@ -523,7 +523,10 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc,
|
|||
if (!isolation_suitable(cc, page))
|
||||
goto next_pageblock;
|
||||
|
||||
/* Skip if free */
|
||||
/*
|
||||
* Skip if free. page_order cannot be used without zone->lock
|
||||
* as nothing prevents parallel allocations or buddy merging.
|
||||
*/
|
||||
if (PageBuddy(page))
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue