Commit 1125b4e3 authored by Gerald Schaefer's avatar Gerald Schaefer Committed by Linus Torvalds

setup_per_zone_pages_min(): take zone->lock instead of zone->lru_lock

This replaces zone->lru_lock in setup_per_zone_pages_min() with zone->lock.
There seems to be no need for the lru_lock anymore, but there is a need for
zone->lock instead, because that function may call move_freepages() via
setup_zone_migrate_reserve().
Signed-off-by: default avatarGerald Schaefer <gerald.schaefer@de.ibm.com>
Acked-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Tested-by: default avatarYasunori Goto <y-goto@jp.fujitsu.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4b2e38ad
...@@ -4242,7 +4242,7 @@ void setup_per_zone_pages_min(void) ...@@ -4242,7 +4242,7 @@ void setup_per_zone_pages_min(void)
for_each_zone(zone) { for_each_zone(zone) {
u64 tmp; u64 tmp;
spin_lock_irqsave(&zone->lru_lock, flags); spin_lock_irqsave(&zone->lock, flags);
tmp = (u64)pages_min * zone->present_pages; tmp = (u64)pages_min * zone->present_pages;
do_div(tmp, lowmem_pages); do_div(tmp, lowmem_pages);
if (is_highmem(zone)) { if (is_highmem(zone)) {
...@@ -4274,7 +4274,7 @@ void setup_per_zone_pages_min(void) ...@@ -4274,7 +4274,7 @@ void setup_per_zone_pages_min(void)
zone->pages_low = zone->pages_min + (tmp >> 2); zone->pages_low = zone->pages_min + (tmp >> 2);
zone->pages_high = zone->pages_min + (tmp >> 1); zone->pages_high = zone->pages_min + (tmp >> 1);
setup_zone_migrate_reserve(zone); setup_zone_migrate_reserve(zone);
spin_unlock_irqrestore(&zone->lru_lock, flags); spin_unlock_irqrestore(&zone->lock, flags);
} }
/* update totalreserve_pages */ /* update totalreserve_pages */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment