lkml.org 
[lkml]   [2007]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.22-stable causes oomkiller to be invoked
On Fri, 21 Dec 2007, Dhaval Giani wrote:

> No, it does not stop the oom I am seeing here.

Duh. Disregard that patch. It looks like check_pgt_cache() is not called.
This could happen if tlb_flush_mmu is never called during the
fork/terminate sequences in your script. pgd_free is called *after* a
possible tlb flush so the pgd page is on the quicklist (which is good for
the next process which needs a pgd). The tlb_flush_mmu's during pte
eviction should trim the quicklist. For some reason this is not happening
on your box (it works here).

Could you try this script that insures that check_pgt_cache is called
after every pgd_free?

Index: linux-2.6/arch/x86/mm/pgtable_32.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/pgtable_32.c 2007-12-26 12:55:10.000000000 -0800
+++ linux-2.6/arch/x86/mm/pgtable_32.c 2007-12-26 12:55:54.000000000 -0800
@@ -366,6 +366,15 @@ void pgd_free(pgd_t *pgd)
}
/* in the non-PAE case, free_pgtables() clears user pgd entries */
quicklist_free(0, pgd_dtor, pgd);
+
+ /*
+ * We must call check_pgd_cache() here because the pgd is freed after
+ * tlb flushing and the call to check_pgd_cache. In some cases the VM
+ * may not call tlb_flush_mmu during process termination (??).
+ * If this is repeated then we may never call check_pgd_cache.
+ * The quicklist will grow and grow. So call check_pgd_cache here.
+ */
+ check_pgt_cache();
}

void check_pgt_cache(void)

\
 
 \ /
  Last update: 2007-12-26 22:05    [W:0.081 / U:1.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site