On 19 February 2002 08:02, Paco Martinez wrote:
> Do you know any newer kernel that solves problem about "OOM Killer" ??
>
> Thank you !!!!
Dont know whether it is in 2.4 mainline, but I use this small patch
-- vdaAuthor: M.H.VanLeeuwen <vanl@megsinet.net> --- linux.virgin/mm/vmscan.c Mon Dec 31 12:46:25 2001 +++ linux/mm/vmscan.c Fri Jan 11 18:03:05 2002 @@ -394,9 +394,9 @@ if (PageDirty(page) && is_page_cache_freeable(page) && page->mapping) { /* * It is not critical here to write it only if - * the page is unmapped beause any direct writer + * the page is unmapped because any direct writer * like O_DIRECT would set the PG_dirty bitflag - * on the phisical page after having successfully + * on the physical page after having successfully * pinned it and after the I/O to the page is finished, * so the direct writes to the page cannot get lost. */ @@ -480,11 +480,14 @@
/* * Alert! We've found too many mapped pages on the - * inactive list, so we start swapping out now! + * inactive list. + * Move referenced pages to the active list. */ - spin_unlock(&pagemap_lru_lock); - swap_out(priority, gfp_mask, classzone); - return nr_pages; + if (PageReferenced(page) && !PageLocked(page)) { + del_page_from_inactive_list(page); + add_page_to_active_list(page); + } + continue; }
/* @@ -521,6 +524,9 @@ } spin_unlock(&pagemap_lru_lock);
+ if (max_mapped <= 0 && (nr_pages > 0 || priority < DEF_PRIORITY)) + swap_out(priority, gfp_mask, classzone); + return nr_pages; }
- 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/
This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:18 EST