Hi, I am getting the Out of memory. To circumvent the problem, I have commented the call to "out_of_memory(), and replaced "goto restart" with "goto nopage". At "nopage:" lable I have added a call to "schedule()" and then "return NULL" after "schedule()". I tried the modified kernel with a test application, the test application is mallocing memory in a loop. Unlike as expected the process gets killed. On second run of the same application I am getting the page allocation failure as expected but subsequently the system hangs. I am attaching the test application and the log herewith. I am getting this exception with kernel 2.6.13. With kernel 2.4.19-rmka7-pxa1 there was no problem. Why its so? What can I do to alleviate the OOM problem? Thanks in anticipation and regards, Abu.
sh-3.00# ./test1 OOM Test: Counter = 0 .... OOM Test: Counter = 6635 , OOM: Out of Memory would have been called....<4>test1: page allocation failure. order:0, mode:0xd2 Mem-info: DMA per-cpu: cpu 0 hot: low 2, high 6, batch 1 used:2 cpu 0 cold: low 0, high 2, batch 1 used:1 Normal per-cpu: empty HighMem per-cpu: empty Free pages: 588kB (0kB HighMem) Active:2178 inactive:230 dirty:0 writeback:0 unstable:0 free:147 slab:367 mapped:2178 pagetables:43 DMA free:588kB min:512kB low:640kB high:768kB active:8712kB inactive:920kB present:16384kB pages_scanned:4851 all_unreclaimable? no lowmem_reserve[]: 0 0 0 Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 HighMem free:0kB min:128kB low:160kB high:192kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 DMA: 9*4kB 3*8kB 1*16kB 0*32kB 0*64kB 0*128kB 0*256kB 1*512kB 0*1024kB = 588kB Normal: empty HighMem: empty Swap cache: add 0, delete 0, find 0/0, race 0+0 Free swap = 0kB Total swap = 0kB Free swap: 0kB 4096 pages of RAM 218 free pages 625 reserved pages 367 slab pages 0 pages shared 0 pages swap cached VM: killing process test1 Killed sh-3.00# ./test1 OOM Test: Counter = 0 .... OOM Test: Counter = 6416 , OOM: Out of Memory would have been called....<4>test1: page allocation failure. order:0, mode:0x201d0 Mem-info: DMA per-cpu: cpu 0 hot: low 2, high 6, batch 1 used:2 cpu 0 cold: low 0, high 2, batch 1 used:1 Normal per-cpu: empty HighMem per-cpu: empty Free pages: 672kB (0kB HighMem) Active:2187 inactive:170 dirty:0 writeback:0 unstable:0 free:168 slab:365 mapped:2125 pagetables:43 DMA free:672kB min:512kB low:640kB high:768kB active:8748kB inactive:680kB present:16384kB pages_scanned:2939 all_unreclaimable? no lowmem_reserve[]: 0 0 0 Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 HighMem free:0kB min:128kB low:160kB high:192kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 DMA: 28*4kB 6*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 1*512kB 0*1024kB = 672kB Normal: empty HighMem: empty Swap cache: add 0, delete 0, find 0/0, race 0+0 Free swap = 0kB Total swap = 0kB Free swap: 0kB 4096 pages of RAM 239 free pages 625 reserved pages 365 slab pages 13 pages shared 0 pages swap cached Error -5 while decompressing! c01e42f4(2388)->c0754000(4096) Error -3 while decompressing! c01e4c48(2531)->c0caf000(4096) Error -3 while decompressing! c01e562b(2643)->c0914000(4096) , OOM: Out of Memory would have been called....<4>test1: page allocation failure. order:0, mode:0x201d2 Mem-info: DMA per-cpu: cpu 0 hot: low 2, high 6, batch 1 used:3 cpu 0 cold: low 0, high 2, batch 1 used:1 Normal per-cpu: empty HighMem per-cpu: empty Free pages: 600kB (0kB HighMem) Active:2267 inactive:113 dirty:0 writeback:0 unstable:0 free:150 slab:365 mapped:2125 pagetables:43 DMA free:600kB min:512kB low:640kB high:768kB active:9068kB inactive:452kB present:16384kB pages_scanned:222 all_unreclaimable? no lowmem_reserve[]: 0 0 0 Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 HighMem free:0kB min:128kB low:160kB high:192kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 DMA: 22*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 1*512kB 0*1024kB = 600kB Normal: empty HighMem: empty Swap cache: add 0, delete 0, find 0/0, race 0+0 Free swap = 0kB Total swap = 0kB Free swap: 0kB 4096 pages of RAM 222 free pages 625 reserved pages 365 slab pages 13 pages shared 0 pages swap cached , OOM: Out of Memory would have been called....<4>init: page allocation failure. order:0, mode:0x201d0 Mem-info: DMA per-cpu: cpu 0 hot: low 2, high 6, batch 1 used:3 cpu 0 cold: low 0, high 2, batch 1 used:1 Normal per-cpu: empty HighMem per-cpu: empty Free pages: 696kB (0kB HighMem) Active:2220 inactive:136 dirty:0 writeback:0 unstable:0 free:174 slab:365 mapped:2125 pagetables:43 DMA free:696kB min:512kB low:640kB high:768kB active:8880kB inactive:544kB present:16384kB pages_scanned:6729 all_unreclaimable? no lowmem_reserve[]: 0 0 0 Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 HighMem free:0kB min:128kB low:160kB high:192kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 DMA: 44*4kB 1*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 1*512kB 0*1024kB = 696kB Normal: empty HighMem: empty Swap cache: add 0, delete 0, find 0/0, race 0+0 Free swap = 0kB Total swap = 0kB Free swap: 0kB 4096 pages of RAM 246 free pages 625 reserved pages 365 slab pages 3 pages shared 0 pages swap cached Error -5 while decompressing! c01e7949(2386)->c040d000(4096) Error -3 while decompressing! c01e829b(2297)->c05e9000(4096) , OOM: Out of Memory would have been called....<4>init: page allocation failure. order:0, mode:0x201d2 Mem-info: DMA per-cpu: cpu 0 hot: low 2, high 6, batch 1 used:4 cpu 0 cold: low 0, high 2, batch 1 used:1 Normal per-cpu: empty HighMem per-cpu: empty Free pages: 600kB (0kB HighMem) Active:2189 inactive:166 dirty:0 writeback:0 unstable:0 free:150 slab:364 mapped:2125 pagetables:43 DMA free:600kB min:512kB low:640kB high:768kB active:8756kB inactive:664kB present:16384kB pages_scanned:7675 all_unreclaimable? no lowmem_reserve[]: 0 0 0 Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 HighMem free:0kB min:128kB low:160kB high:192kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 DMA: 20*4kB 1*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 1*512kB 0*1024kB = 600kB Normal: empty HighMem: empty Swap cache: add 0, delete 0, find 0/0, race 0+0 Free swap = 0kB Total swap = 0kB Free swap: 0kB 4096 pages of RAM 223 free pages 625 reserved pages 364 slab pages 1 pages shared 0 pages swap cached , OOM: Out of Memory would have been called....<4>test1: page allocation failure. order:0, mode:0x201d0 Mem-info: DMA per-cpu: cpu 0 hot: low 2, high 6, batch 1 used:4 cpu 0 cold: low 0, high 2, batch 1 used:1 Normal per-cpu: empty HighMem per-cpu: empty Free pages: 600kB (0kB HighMem) Active:2291 inactive:64 dirty:0 writeback:0 unstable:0 free:150 slab:364 mapped:2125 pagetables:43 DMA free:600kB min:512kB low:640kB high:768kB active:9164kB inactive:256kB present:16384kB pages_scanned:10106 all_unreclaimable? yes lowmem_reserve[]: 0 0 0 Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 HighMem free:0kB min:128kB low:160kB high:192kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 DMA: 20*4kB 1*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 1*512kB 0*1024kB = 600kB Normal: empty HighMem: empty Swap cache: add 0, delete 0, find 0/0, race 0+0 Free swap = 0kB Total swap = 0kB Free swap: 0kB 4096 pages of RAM 223 free pages 625 reserved pages 364 slab pages 2 pages shared 0 pages swap cached , OOM: Out of Memory would have been called....<4>init: page allocation failure. order:0, mode:0x201d2 Mem-info: DMA per-cpu: cpu 0 hot: low 2, high 6, batch 1 used:4 cpu 0 cold: low 0, high 2, batch 1 used:0 Normal per-cpu: empty HighMem per-cpu: empty Free pages: 512kB (0kB HighMem) Active:2296 inactive:125 dirty:0 writeback:0 unstable:0 free:128 slab:364 mapped:2127 pagetables:43 DMA free:512kB min:512kB low:640kB high:768kB active:9184kB inactive:500kB present:16384kB pages_scanned:10106 all_unreclaimable? yes lowmem_reserve[]: 0 0 0 Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 HighMem free:0kB min:128kB low:160kB high:192kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 1*512kB 0*1024kB = 512kB Normal: empty HighMem: empty Swap cache: add 0, delete 0, find 0/0, race 0+0 Free swap = 0kB Total swap = 0kB Free swap: 0kB 4096 pages of RAM 200 free pages 625 reserved pages 364 slab pages 34 pages shared 0 pages swap cached , OOM: Out of Memory would have been called....<4>init: page allocation failure. order:0, mode:0x201d2 Mem-info: DMA per-cpu: cpu 0 hot: low 2, high 6, batch 1 used:4 cpu 0 cold: low 0, high 2, batch 1 used:0 Normal per-cpu: empty HighMem per-cpu: empty Free pages: 512kB (0kB HighMem) Active:2296 inactive:125 dirty:0 writeback:0 unstable:0 free:128 slab:364 mapped:2127 pagetables:43 DMA free:512kB min:512kB low:640kB high:768kB active:9184kB inactive:500kB present:16384kB pages_scanned:10106 all_unreclaimable? yes lowmem_reserve[]: 0 0 0 Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 HighMem free:0kB min:128kB low:160kB high:192kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 1*512kB 0*1024kB = 512kB Normal: empty HighMem: empty Swap cache: add 0, delete 0, find 0/0, race 0+0 Free swap = 0kB Total swap = 0kB Free swap: 0kB 4096 pages of RAM 200 free pages 625 reserved pages 364 slab pages 34 pages shared 0 pages swap cached , OOM: Out of Memory would have been called....<4>test1: page allocation failure. order:0, mode:0x201d2 Mem-info: DMA per-cpu: cpu 0 hot: low 2, high 6, batch 1 used:4 cpu 0 cold: low 0, high 2, batch 1 used:0 Normal per-cpu: empty HighMem per-cpu: empty Free pages: 512kB (0kB HighMem) Active:2296 inactive:125 dirty:0 writeback:0 unstable:0 free:128 slab:364 mapped:2133 pagetables:43 DMA free:512kB min:512kB low:640kB high:768kB active:9184kB inactive:500kB present:16384kB pages_scanned:10106 all_unreclaimable? yes lowmem_reserve[]: 0 0 0 Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 HighMem free:0kB min:128kB low:160kB high:192kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 1*512kB 0*1024kB = 512kB Normal: empty HighMem: empty Swap cache: add 0, delete 0, find 0/0, race 0+0 Free swap = 0kB Total swap = 0kB Free swap: 0kB 4096 pages of RAM 200 free pages 625 reserved pages 364 slab pages 40 pages shared 0 pages swap cached , OOM: Out of Memory would have been called....VM: killing process test1
Attachment:
test1.c
Description: Binary data
- Follow-Ups:
- Re: Commenting out out_of_memory() function in __alloc_pages()
- From: Robin Holt <[email protected]>
- Re: Commenting out out_of_memory() function in __alloc_pages()
- From: Chase Venters <[email protected]>
- Re: Commenting out out_of_memory() function in __alloc_pages()
- Prev by Date: Re: [PATCH 1/6] FDPIC: Fix FDPIC compile errors [try #3]
- Next by Date: Re: [PATCH 5/6] FDPIC: Add coredump capability for the ELF-FDPIC binfmt [try #3]
- Previous by thread: linux-2.6.17-mm6: strange kobject message
- Next by thread: Re: Commenting out out_of_memory() function in __alloc_pages()
- Index(es):