mm: compaction: acquire the zone->lock as late as possible
Compaction's free scanner acquires the zone->lock when checking for
PageBuddy pages and isolating them. It does this even if there are no
PageBuddy pages in the range.
This patch defers acquiring the zone lock for as long as possible. In the
event there are no free pages in the pageblock then the lock will not be
acquired at all which reduces contention on zone->lock.
Signed-off-by: Mel Gorman <[email protected]>
Acked-by: Rik van Riel <[email protected]>
Cc: Richard Davies <[email protected]>
Cc: Shaohua Li <[email protected]>
Cc: Avi Kivity <[email protected]>
Acked-by: Rafael Aquini <[email protected]>
Acked-by: Minchan Kim <[email protected]>
Tested-by: Peter Ujfalusi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>