From f1da2c3860e301527d56a1ef0b56c649ee7c4b1b Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 15 Jul 2000 03:32:22 +0000 Subject: Merge with Linux 2.4.0-test5-pre1. This works again on Origin UP. The IP22 cache bugs which are plaguing some machines are still unfixed. --- mm/memory.c | 8 ++++---- mm/slab.c | 2 +- mm/vmscan.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'mm') diff --git a/mm/memory.c b/mm/memory.c index de7dc07f8..83f1586d4 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -373,12 +373,12 @@ void zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long s spin_unlock(&mm->page_table_lock); /* * Update rss for the mm_struct (not necessarily current->mm) + * Notice that rss is an unsigned long. */ - if (mm->rss > 0) { + if (mm->rss > freed) mm->rss -= freed; - if (mm->rss < 0) - mm->rss = 0; - } + else + mm->rss = 0; } diff --git a/mm/slab.c b/mm/slab.c index a24e46582..a31f0f7e7 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1966,7 +1966,7 @@ int slabinfo_read_proc (char *page, char **start, off_t off, #define MAX_SLABINFO_WRITE 128 /** * slabinfo_write_proc - SMP tuning for the slab allocator - * @file: + * @file: unused * @buffer: user buffer * @count: data len * @data: unused diff --git a/mm/vmscan.c b/mm/vmscan.c index f19721ee5..c43456da6 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -548,9 +548,9 @@ static int do_try_to_free_pages(unsigned int gfp_mask) if (!--count) goto done; } - /* We return 1 if we are freed some page, or - * there are no memory pressure remaining */ - return (count != FREE_COUNT || !memory_pressure()); + /* Return 1 if any page is freed, or + * there are no more memory pressure */ + return (count < FREE_COUNT || !memory_pressure()); done: return 1; -- cgit v1.2.3