summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-07 15:45:24 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-07 15:45:24 +0000
commit9f9f3e6e8548a596697778337110a423c384b6f3 (patch)
tree5dd4b290ef532cf5ecb058e1a92cd3435afeac8c /mm
parentd5c9a365ee7d2fded249aa5abfc5e89587583029 (diff)
Merge with Linux 2.3.49.
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c10
-rw-r--r--mm/mmap.c2
-rw-r--r--mm/page_alloc.c2
-rw-r--r--mm/vmscan.c10
4 files changed, 7 insertions, 17 deletions
diff --git a/mm/memory.c b/mm/memory.c
index aab598aed..1232bd928 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -70,16 +70,6 @@ static inline void copy_cow_page(struct page * from, struct page * to, unsigned
mem_map_t * mem_map = NULL;
/*
- * oom() prints a message (so that the user knows why the process died),
- * and gives the process an untrappable SIGKILL.
- */
-void oom(struct task_struct * task)
-{
- printk("\nOut of memory for %s.\n", task->comm);
- force_sig(SIGKILL, task);
-}
-
-/*
* Note: this doesn't free the actual pages themselves. That
* has been handled earlier when unmapping all the memory regions.
*/
diff --git a/mm/mmap.c b/mm/mmap.c
index dfb02a95d..5a6820972 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -860,7 +860,7 @@ void exit_mmap(struct mm_struct * mm)
if (mm->map_count)
printk("exit_mmap: map count is %d\n", mm->map_count);
- clear_page_tables(mm, 0, USER_PTRS_PER_PGD);
+ clear_page_tables(mm, FIRST_USER_PGD_NR, USER_PTRS_PER_PGD);
}
/* Insert vm structure into process list sorted by address
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 1b61ebd17..4e1647b84 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -337,7 +337,7 @@ unsigned int nr_free_buffer_pages (void)
zone_t *zone;
int i;
- sum = nr_lru_pages - atomic_read(&page_cache_size);
+ sum = nr_lru_pages;
for (i = 0; i < NUMNODES; i++)
for (zone = NODE_DATA(i)->node_zones; zone <= NODE_DATA(i)->node_zones+ZONE_NORMAL; zone++)
sum += zone->free_pages;
diff --git a/mm/vmscan.c b/mm/vmscan.c
index fa687b7e0..603b9a2e0 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -326,6 +326,7 @@ static int swap_out(unsigned int priority, int gfp_mask)
struct task_struct * p;
int counter;
int __ret = 0;
+ int assign = 0;
lock_kernel();
/*
@@ -345,12 +346,9 @@ static int swap_out(unsigned int priority, int gfp_mask)
counter = nr_threads / (priority+1);
if (counter < 1)
counter = 1;
- if (counter > nr_threads)
- counter = nr_threads;
for (; counter >= 0; counter--) {
- int assign = 0;
- int max_cnt = 0;
+ unsigned long max_cnt = 0;
struct mm_struct *best = NULL;
int pid = 0;
select:
@@ -363,7 +361,7 @@ static int swap_out(unsigned int priority, int gfp_mask)
if (mm->rss <= 0)
continue;
/* Refresh swap_cnt? */
- if (assign)
+ if (assign == 1)
mm->swap_cnt = mm->rss;
if (mm->swap_cnt > max_cnt) {
max_cnt = mm->swap_cnt;
@@ -372,6 +370,8 @@ static int swap_out(unsigned int priority, int gfp_mask)
}
}
read_unlock(&tasklist_lock);
+ if (assign == 1)
+ assign = 2;
if (!best) {
if (!assign) {
assign = 1;