Messages in this thread Patch in this message | | | Date | Tue, 2 Nov 1999 13:21:58 +0100 (CET) | From | Ingo Molnar <> | Subject | [patch] highmem-2.3.25-A0 |
| |
On Mon, 1 Nov 1999, Andrea Arcangeli wrote:
> dirty = size_buffers_type[BUF_DIRTY] >> PAGE_SHIFT; > - tot = nr_lru_pages + nr_free_pages + nr_free_highpages; > + tot = nr_lru_pages + nr_free_pages - nr_free_highpages; > hard_dirty_limit = tot * bdf_prm.b_un.nfract / 100; > soft_dirty_limit = hard_dirty_limit >> 1;
additionally high memory pages were accounted for incorrectly in the page allocator as well, i've attached the fixes (against final-2.3.25). It's important to balance only 'normal memory', at least now.
Ingo --- linux/mm/page_alloc.c.orig Tue Nov 2 00:08:28 1999 +++ linux/mm/page_alloc.c Tue Nov 2 00:48:02 1999 @@ -262,11 +262,11 @@ } low_on_highmemory = 1; } else { - if (nr_free_pages+nr_free_highpages > freepages.min) { + if (nr_free_pages-nr_free_highpages > freepages.min) { if (!low_on_memory) { return 1; } - if (nr_free_pages+nr_free_highpages >= freepages.high) { + if (nr_free_pages-nr_free_highpages >= freepages.high) { low_on_memory = 0; return 1; } @@ -320,6 +320,10 @@ do { page = rmqueue(order, type); if (page) { +#ifdef CONFIG_HIGHMEM + if (type == MEM_TYPE_HIGH) + nr_free_highpages -= 1 << order; +#endif spin_unlock_irqrestore(&page_alloc_lock, flags); return page; }
| |