mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
mm, vmscan: move lru_lock to the node
Node-based reclaim requires node-based LRUs and locking. This is a preparation patch that just moves the lru_lock to the node so later patches are easier to review. It is a mechanical change but note this patch makes contention worse because the LRU lock is hotter and direct reclaim and kswapd can contend on the same lock even when reclaiming from different zones. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Mel Gorman <[email protected]> Reviewed-by: Minchan Kim <[email protected]> Acked-by: Johannes Weiner <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Cc: Hillf Danton <[email protected]> Cc: Joonsoo Kim <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Rik van Riel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
75ef718405
commit
a52633d8e9
14 changed files with 75 additions and 69 deletions
|
|
@ -752,7 +752,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
|
|||
* if contended.
|
||||
*/
|
||||
if (!(low_pfn % SWAP_CLUSTER_MAX)
|
||||
&& compact_unlock_should_abort(&zone->lru_lock, flags,
|
||||
&& compact_unlock_should_abort(zone_lru_lock(zone), flags,
|
||||
&locked, cc))
|
||||
break;
|
||||
|
||||
|
|
@ -813,7 +813,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
|
|||
if (unlikely(__PageMovable(page)) &&
|
||||
!PageIsolated(page)) {
|
||||
if (locked) {
|
||||
spin_unlock_irqrestore(&zone->lru_lock,
|
||||
spin_unlock_irqrestore(zone_lru_lock(zone),
|
||||
flags);
|
||||
locked = false;
|
||||
}
|
||||
|
|
@ -836,7 +836,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
|
|||
|
||||
/* If we already hold the lock, we can skip some rechecking */
|
||||
if (!locked) {
|
||||
locked = compact_trylock_irqsave(&zone->lru_lock,
|
||||
locked = compact_trylock_irqsave(zone_lru_lock(zone),
|
||||
&flags, cc);
|
||||
if (!locked)
|
||||
break;
|
||||
|
|
@ -899,7 +899,7 @@ isolate_fail:
|
|||
*/
|
||||
if (nr_isolated) {
|
||||
if (locked) {
|
||||
spin_unlock_irqrestore(&zone->lru_lock, flags);
|
||||
spin_unlock_irqrestore(zone_lru_lock(zone), flags);
|
||||
locked = false;
|
||||
}
|
||||
acct_isolated(zone, cc);
|
||||
|
|
@ -927,7 +927,7 @@ isolate_fail:
|
|||
low_pfn = end_pfn;
|
||||
|
||||
if (locked)
|
||||
spin_unlock_irqrestore(&zone->lru_lock, flags);
|
||||
spin_unlock_irqrestore(zone_lru_lock(zone), flags);
|
||||
|
||||
/*
|
||||
* Update the pageblock-skip information and cached scanner pfn,
|
||||
|
|
|
|||
Loading…
Reference in a new issue