lkml.org 
[lkml]   [1999]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] 2.2.0-pre5 FreeAfter() check missing
2.2.0-pre5 doesn't check if the page is under async swapout before
do a COW. I think it was not harming because shrink_mmap() should be able
to shrink the orphaned swap cache page. But here the fix:

Index: memory.c
===================================================================
RCS file: /var/cvs/linux/mm/memory.c,v
retrieving revision 1.1.1.1.2.8
diff -u -r1.1.1.1.2.8 memory.c
--- memory.c 1999/01/07 11:57:23 1.1.1.1.2.8
+++ memory.c 1999/01/08 11:07:03
@@ -625,6 +625,7 @@
pte_t pte;
unsigned long old_page, new_page;
struct page * page_map;
+ int count;

pte = *page_table;
new_page = __get_free_page(GFP_USER);
@@ -649,7 +650,9 @@
* in which case we can remove the page
* from the swap cache.
*/
- switch (atomic_read(&page_map->count)) {
+ count = atomic_read(&page_map->count);
+ if (PageFreeAfter(page_map)) count--;
+ switch (count) {
case 2:
if (!PageSwapCache(page_map))
break;

Andrea Arcangeli


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.069 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site