Fix setup_per_zone_pages_min().
Now setup_per_zone_pages_min() uses zone->lru_lock. This has 2 problems.
1. setup_page_zone_pages_min() modifies zone->pages_min,pages_low,pages_high.
in atomic. But readers of these values tend not to take lru_lock.
(At least, we need lock between memory hotplug vs. sysctl)
2. setup_zone_migrate_reserve() should take zone->lock instead of lru_lock.
This patch replaces zone->lru_lock with zone->lock.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
---
mm/page_alloc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: devel-2.6.23-rc4-mm1-zone/mm/page_alloc.c
===================================================================
--- devel-2.6.23-rc4-mm1-zone.orig/mm/page_alloc.c
+++ devel-2.6.23-rc4-mm1-zone/mm/page_alloc.c
@@ -4176,8 +4176,8 @@ void setup_per_zone_pages_min(void)
for_each_zone(zone) {
u64 tmp;
+ spin_lock_irqsave(&zone->lock, flags);
- spin_lock_irqsave(&zone->lru_lock, flags);
tmp = (u64)pages_min * zone->present_pages;
do_div(tmp, lowmem_pages);
if (is_highmem(zone)) {
@@ -4208,8 +4208,9 @@ void setup_per_zone_pages_min(void)
zone->pages_low = zone->pages_min + (tmp >> 2);
zone->pages_high = zone->pages_min + (tmp >> 1);
+
setup_zone_migrate_reserve(zone);
- spin_unlock_irqrestore(&zone->lru_lock, flags);
+ spin_unlock_irqrestore(&zone->lock, flags);
}
/* update totalreserve_pages */
-
| Greg Kroah-Hartman | [PATCH 019/196] DMA: Convert from class_device to device for DMA engine |
| Tejun Heo | [PATCH 4/7] FUSE: implement direct lseek support |
| Parag Warudkar | BUG: soft lockup - CPU#1 stuck for 15s! [swapper:0] |
| Greg Smith | PostgreSQL pgbench performance regression in 2.6.23+ |
git: | |
| Len Brown | fatal: unable to create '.git/index': File exists |
| Dan Farina | backup or mirror a repository |
| André Goddard Rosa | Using kdiff3 to compare two different revisions of a folder |
| Petko Manolov | git and binary files |
| Richard Stallman | Real men don't attack straw men |
| Steve B | Intel Atom and D945GCLF2 |
| Jeff Ross | U320 Drive on U160 controller? |
| Sunnz | How do I configure sendmail? |
| Eric Dumazet | [PATCH] fs: pipe/sockets/anon dentries should not have a parent |
| Denys Fedoryshchenko | thousands of classes, e1000 TX unit hang |
| Wei Yongjun | [PATCH] xfrm: Fix kernel panic when flush and dump SPD entries |
| Steffen Klassert | [RFC PATCH 4/5] crypto: allow allocation of percpu crypto transforms |
