Messages in this thread Patch in this message | | | Date | Tue, 13 Jul 2004 22:20:10 -0700 | From | William Lee Irwin III <> | Subject | Re: Can't make use of swap memory in 2.6.7-bk19 |
| |
On Thu, Jul 08, 2004 at 11:30:45AM +0200, Peter Osterlund wrote: > swappiness is set to 60. > However, I realized that I had set /proc/sys/vm/laptop_mode to 1. If I set > it to 0, 2.6.7-bk10 starts to work.
Probably not what will get merged, but does the following brutal hack do anything for you?
Index: laptop-2.6.8-rc1/mm/vmscan.c =================================================================== --- laptop-2.6.8-rc1.orig/mm/vmscan.c 2004-07-11 10:33:55.000000000 -0700 +++ laptop-2.6.8-rc1/mm/vmscan.c 2004-07-13 22:18:04.193959968 -0700 @@ -902,7 +902,7 @@ sc.may_writepage = 0; inc_page_state(allocstall); - +retry: for (i = 0; zones[i] != 0; i++) zones[i]->temp_priority = DEF_PRIORITY; @@ -940,8 +940,14 @@ if (sc.nr_scanned && priority < DEF_PRIORITY - 2) blk_congestion_wait(WRITE, HZ/10); } - if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY)) - out_of_memory(); + if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY)) { + if (!laptop_mode || sc.may_writepage) + out_of_memory(); + else { + sc.may_writepage = 1; + goto retry; + } + } out: for (i = 0; zones[i] != 0; i++) zones[i]->prev_priority = zones[i]->temp_priority; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |