Re: Memory Problem in 2.4.9 ?

From: Stephan von Krawczynski (skraw@ithnet.com)
Date: Wed Aug 22 2001 - 06:01:06 EST


On Wed, 22 Aug 2001 07:33:38 +0200 (CEST)
Mike Galbraith <mikeg@wen-online.de> wrote:

>> HAHAHA.. I was right, hurried whack with my little hammer _did_ bust
> it all to pieces :)
>
> This is also (very!) hurried and _lightly_ tested, but still cures my
> problem.. what do you think?
>
> -Mike
>
>
> --- linux-2.4.9/mm/vmscan.c.org Sun Aug 19 08:55:24 2001
> +++ linux-2.4.9/mm/vmscan.c Wed Aug 22 05:03:50 2001
> @@ -506,11 +506,17 @@
> }
[...]
> + if (++page->age > PAGE_AGE_START) {

I am not very experienced with the aging algorithm, but can this statement be false at all? I mean if I get that right page->age starts with PAGE_AGE_START, doesn't it?

> + del_page_from_inactive_dirty_list(page);
> + add_page_to_active_list(page);
> + page->age = PAGE_AGE_START;
> + continue;
> + }
> + list_del(page_lru);
> + list_add(page_lru, &inactive_dirty_list);
> continue;
> }
>
> @@ -927,7 +933,7 @@
> recalculate_vm_stats();
> }
>
> - if (!do_try_to_free_pages(GFP_KSWAPD, 1)) {
> + if (!do_try_to_free_pages(GFP_KSWAPD, 0)) {
> if (out_of_memory())
> oom_kill();
> continue;
> --- linux-2.4.9/mm/filemap.c.org Mon Aug 20 17:25:20 2001
> +++ linux-2.4.9/mm/filemap.c Wed Aug 22 05:07:35 2001
> @@ -980,12 +980,9 @@
> static inline void check_used_once (struct page *page)
> {
> if (!PageActive(page)) {
> - if (page->age)
> + if (++page->age > PAGE_AGE_START)

same here. Am I missing something?

> activate_page(page);
> - else {
> - page->age = PAGE_AGE_START;
> - ClearPageReferenced(page);
> - }
> + ClearPageReferenced(page);
> }
> }
>
>
>
-
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 : Thu Aug 23 2001 - 21:00:48 EST