CONFIG_SLAB_DEBUG and NUMA API
Quoted 8 lines · Andrew Morton
Quoted 5 lines · Andi Kleen
I tested 2.6.7-mm6 with NUMA on with
CONFIG_SLAB_DEBUGand I didn't see any oopses. Do you have a recipe to reproduce them?Still happens here. Booting SLES9.1 with the attached config.
[...]
Here's a patch. The problem was that the kernel exit would allocate memory to send exit signals after the local mempolicy was already freed, but not zeroed. When the allocator tried to grab more memory it would fall over.
-Andi
-------------------------------------------------------------
Move the memory policy freeing to later in exit to make sure the last memory allocations don't use an uninitialized policy
kernel/exit.c renamed from kernel/exit.c-o +4 -3
@@ -828,9 +828,6 @@__exit_fs (tsk);exit_namespace (tsk);exit_thread (); -#ifdef CONFIG_NUMA -mpol_free (tsk->mempolicy); -#endif if (tsk->signal->leader)disassociate_ctty (1 );
@@ -841,6 +838,10 @@ tsk->exit_code = code;exit_notify (tsk); +#ifdef CONFIG_NUMA +mpol_free (tsk->mempolicy); + tsk->mempolicy =NULL ; +#endif schedule ();BUG ();/* Avoid "noreturn function does return". */
Quoted 14 lines · Andi Kleen
Quoted 5 lines · Andrew Morton
Quoted 2 lines · Andi Kleen
I tested 2.6.7-mm6 with NUMA on with
CONFIG_SLAB_DEBUGand I didn't see any oopses. Do you have a recipe to reproduce them?Still happens here. Booting SLES9.1 with the attached config.
[...]
Here's a patch. The problem was that the kernel exit would allocate memory to send exit signals after the local mempolicy was already freed, but not zeroed. When the allocator tried to grab more memory it would fall over.
Quoted 6 lines
-Andi
-------------------------------------------------------------
Move the memory policy freeing to later in exit to make sure the last memory allocations don't use an uninitialized policy
It fixed the problems that I had reported on both 2.6.7-mm6 and 2.6.7-bk18. Thanks a lot,
rjw
Signature · 5 lines
Rafael J. Wysocki ---------------------------- For a successful technology, reality must take precedence over public relations, for nature cannot be fooled. -- Richard P. Feynman