diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:19:13 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:19:13 -0800 |
| commit | a27c6530ff12bab100e64c5b43e84f759fa353ae (patch) | |
| tree | b8a7b6abedf07872d2e5f8f6175390f362fbf47b /mm/page_alloc.c | |
| parent | dfc52b82fee5bc6713ecce3f81767a8565c4f874 (diff) | |
v2.4.9.12 -> v2.4.9.13
- Manfred Spraul: /proc/pid/maps cleanup (and bugfix for non-x86)
- Al Viro: "block device fs" - cleanup of page cache handling
- Hugh Dickins: VM/shmem cleanups and swap search speedup
- David Miller: sparc updates, soc driver typo fix, net updates
- Jeff Garzik: network driver updates (dl2k, yellowfin and tulip)
- Neil Brown: knfsd cleanups and fixues
- Ben LaHaise: zap_page_range merge from -ac
Diffstat (limited to 'mm/page_alloc.c')
| -rw-r--r-- | mm/page_alloc.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 779c4af4f8e8..b90c6e644d65 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -86,8 +86,7 @@ static void __free_pages_ok (struct page *page, unsigned int order) BUG(); if (PageInactive(page)) BUG(); - if (PageDirty(page)) - BUG(); + page->flags &= ~((1<<PG_referenced) | (1<<PG_dirty)); if (current->flags & PF_FREE_PAGES) goto local_freelist; @@ -368,6 +367,7 @@ struct page * __alloc_pages(unsigned int gfp_mask, unsigned int order, zonelist_ return NULL; } + rebalance: page = balance_classzone(classzone, gfp_mask, order, &freed); if (page) return page; @@ -379,10 +379,13 @@ struct page * __alloc_pages(unsigned int gfp_mask, unsigned int order, zonelist_ if (!z) break; - page = rmqueue(z, order); - if (page) - return page; + if (zone_free_pages(z, order) > z->pages_min) { + page = rmqueue(z, order); + if (page) + return page; + } } + goto rebalance; } else { /* * Check that no other task is been killed meanwhile, |
