hi Michal: > I would just mark NR_FREE_PAGES before and after allocation request. > Something like: > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index f8f3bfc435ee..a1337aa7e897 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -3565,6 +3565,9 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, > enum compact_result compact_result; > int compaction_retries = 0; > int no_progress_loops = 0; > + unsigned long nr_free_before; > + > + nr_free_before = global_page_state(NR_FREE_PAGES); > > /* > * In the slowpath, we sanity check order to avoid ever trying to > @@ -3624,6 +3627,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, > * to fail. > */ > WARN_ON_ONCE(gfp_mask & __GFP_NOFAIL); > + pr_info("nr_free_before:%lu nr_free_now:%lu\n", nr_free_before, global_page_state(NR_FREE_PAGES)); > goto nopage; > } > > You can then compare the numbers before after and the allocation failure > to see whether there is a large gap. I follow your suggestion to add nr_free_before for comparing when allocation failure comes out. from the log, it shows that nr_free_before has lot of free pages and the value is the same even allocation fail. It seems there are some other conditions that will let page order =0 with GFP_ATOMIC (mode = 0x20) fail even free pages and pcp is enough. Sincerely appreciate your kind help, nr_free_before:14094 nr_free_now:14094 opera_omi: page allocation failure: order:0, mode:0x20 CPU: 0 PID: 20846 Comm: opera_omi Tainted: G O 3.10.0+ #14 Backtrace: [<c00129f8>] (dump_backtrace+0x0/0x114) from [<c0012c68>] (show_stack+0x20/0x24) r6:ca01e000 r5:00000000 r4:00000020 r3:271ae71c [<c0012c48>] (show_stack+0x0/0x24) from [<c056d32c>] (dump_stack+0x24/0x28) [<c056d308>] (dump_stack+0x0/0x28) from [<c010c668>] (warn_alloc_failed+0xec/0x128) [<c010c57c>] (warn_alloc_failed+0x0/0x128) from [<c010fd58>] (__alloc_pages_nodemask+0x748/0x97c) r3:00000000 r2:00000000 r7:c07fe240 r6:00000000 r5:00000000 r4:00000020 [<c010f610>] (__alloc_pages_nodemask+0x0/0x97c) from [<c043ec04>] (__netdev_alloc_frag+0x1cc/0x1e8) [<c043ea38>] (__netdev_alloc_frag+0x0/0x1e8) from [<c04412cc>] (__netdev_alloc_skb+0x84/0xe0) [<c0441248>] (__netdev_alloc_skb+0x0/0xe0) from [<bfbf834c>] (_rtw_skb_alloc+0x3c/0x40 [8812au]) r6:0000007a r5:d4899168 r4:000000b6 r3:00000100 [<bfbf8310>] (_rtw_skb_alloc+0x0/0x40 [8812au]) from [<bfc0bc80>] (rtw_os_alloc_recvframe+0x6c/0xfc [8812au]) [<bfc0bc14>] (rtw_os_alloc_recvframe+0x0/0xfc [8812au]) from [<bfc4ea2c>] (recvbuf2recvframe+0x234/0x388 [8812au]) [<bfc4e7f8>] (recvbuf2recvframe+0x0/0x388 [8812au]) from [<bfbff438>] (usb_recv_tasklet+0x6c/0x94 [8812au]) [<bfbff3cc>] (usb_recv_tasklet+0x0/0x94 [8812au]) from [<c002de24>] (tasklet_action+0xa8/0x178) r7:c07b25ec r6:00000000 r5:d4809b5c r4:d4809b58 [<c002dd7c>] (tasklet_action+0x0/0x178) from [<c002cdd0>] (__do_softirq+0x164/0x344) r8:cd919484 r7:00000018 r6:c07b8098 r5:ca01e000 r4:00000006 r3:c002dd7c [<c002cc6c>] (__do_softirq+0x0/0x344) from [<c002d530>] (irq_exit+0xbc/0xf0) [<c002d474>] (irq_exit+0x0/0xf0) from [<c000eda0>] (handle_IRQ+0x54/0xa0) r5:00000056 r4:c07b3f40 [<c000ed4c>] (handle_IRQ+0x0/0xa0) from [<c0008594>] (gic_handle_irq+0x3c/0x6c) r6:ca01fa00 r5:c07c82cc r4:feffe10c r3:00000000 [<c0008558>] (gic_handle_irq+0x0/0x6c) from [<c0571744>] (__irq_svc+0x44/0x78) Exception stack(0xca01fa00 to 0xca01fa48) fa00: cd919484 00000000 deaf1eed 80000001 cd919484 ca01fac0 00003175 00000000 fa20: cd919484 00000000 0000000c ca01fa5c ca01fa60 ca01fa48 c0570e0c c0294ee8 fa40: 880f0153 ffffffff 00000000 r7:ca01fa34 r6:ffffffff r5:880f0153 r4:c0294ee8 [<c0294eb4>] (do_raw_read_lock+0x0/0x54) from [<c0570e0c>] (_raw_read_lock+0x28/0x2c) r4:cd919484 r3:00000000 [<c0570de4>] (_raw_read_lock+0x0/0x2c) from [<c01f0940>] (ext4_es_lookup_extent+0x30/0x1dc) r4:cd9192c8 r3:00000000 [<c01f0910>] (ext4_es_lookup_extent+0x0/0x1dc) from [<c01b5b18>] (ext4_map_blocks+0x40/0x4cc) r8:00000000 r7:00000000 r6:cd9192c8 r5:00000000 r4:ca01fb18 r3:00000000 [<c01b5ad8>] (ext4_map_blocks+0x0/0x4cc) from [<c01b6038>] (_ext4_get_block+0x94/0x188) [<c01b5fa4>] (_ext4_get_block+0x0/0x188) from [<c01b6160>] (ext4_get_block+0x34/0x3c) r9:00000000 r8:ca01fc40 r7:00000000 r6:00003175 r5:00000001 r4:00000000 [<c01b612c>] (ext4_get_block+0x0/0x3c) from [<c01873e8>] (do_mpage_readpage+0x5ac/0x748) [<c0186e3c>] (do_mpage_readpage+0x0/0x748) from [<c0187660>] (mpage_readpages+0xdc/0x138) [<c0187584>] (mpage_readpages+0x0/0x138) from [<c01b531c>] (ext4_readpages+0x50/0x54) [<c01b52cc>] (ext4_readpages+0x0/0x54) from [<c0113628>] (__do_page_cache_readahead+0x1ac/0x260) r6:0000369a r5:00000020 r4:c01b52cc r3:00000014 [<c011347c>] (__do_page_cache_readahead+0x0/0x260) from [<c0113d88>] (ra_submit+0x38/0x40) [<c0113d50>] (ra_submit+0x0/0x40) from [<c01097e8>] (filemap_fault+0x3e4/0x438) [<c0109404>] (filemap_fault+0x0/0x438) from [<c012997c>] (__do_fault+0x80/0x5d4) [<c01298fc>] (__do_fault+0x0/0x5d4) from [<c012cbe4>] (handle_pte_fault+0x84/0x6b0) [<c012cb60>] (handle_pte_fault+0x0/0x6b0) from [<c012d29c>] (handle_mm_fault+0x8c/0xbc) [<c012d210>] (handle_mm_fault+0x0/0xbc) from [<c057354c>] (do_page_fault+0x310/0x428) [<c057323c>] (do_page_fault+0x0/0x428) from [<c000840c>] (do_DataAbort+0x48/0xac) [<c00083c4>] (do_DataAbort+0x0/0xac) from [<c05718dc>] (__dabt_usr+0x3c/0x40) Exception stack(0xca01ffb0 to 0xca01fff8) ffa0: 599ccd49 b59735cc 000048c4 b5e3784c ffc0: 019e6fc8 b5e24cb8 00100080 00000000 be539aec 0196fc00 be5399e0 019e6fc8 ffe0: 00020817 be5398a0 b3bd4765 b3cf394a 280f0170 ffffffff ff131313 r8:be539aec r7:00000000 r6:ffffffff r5:280f0170 r4:b3cf394a Mem-info: Normal per-cpu: CPU 0: hi: 90, btch: 15 usd: 11 CPU 1: hi: 90, btch: 15 usd: 21 HighMem per-cpu: CPU 0: hi: 18, btch: 3 usd: 1 CPU 1: hi: 18, btch: 3 usd: 2 active_anon:54429 inactive_anon:1744 isolated_anon:0 active_file:2226 inactive_file:3338 isolated_file:0 unevictable:0 dirty:44 writeback:0 unstable:0 free:14094 slab_reclaimable:1380 slab_unreclaimable:6532 mapped:4755 shmem:1772 pagetables:1106 bounce:0 free_cma:13863 Normal free:56088kB min:2000kB low:2500kB high:3000kB active_anon:148332kB inactive_anon:6040kB active_file:1356kB inactive_file:5240kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:329728kB managed:250408kB mlocked:0kB dirty:120kB writeback:0kB mapped:8108kB shmem:6136kB slab_reclaimable:5520kB slab_unreclaimable:26128kB kernel_stack:2720kB pagetables:4424kB unstable:0kB bounce:0kB free_cma:55452kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 696 696 HighMem free:288kB min:128kB low:304kB high:480kB active_anon:69384kB inactive_anon:936kB active_file:7548kB inactive_file:8112kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:89088kB managed:89088kB mlocked:0kB dirty:56kB writeback:0kB mapped:10912kB shmem:952kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:11 all_unreclaimable? no lowmem_reserve[]: 0 0 0 Normal: 2152*4kB (UEC) 2157*8kB (UEC) 1889*16kB (UEC) 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 56088kB HighMem: 10*4kB (R) 21*8kB (R) 1*16kB (R) 0*32kB 1*64kB (R) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 288kB 7360 total pagecache pages 0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB RTL871X: rtw_os_alloc_recvframe:can not allocate memory for skb copy RTL871X: pre_recv_entry()-274: alloc_skb() failed!
[ 6571.049922] nr_free_before:14139 nr_free_now:14139 [ 6571.054710] nr_free_before:14094 nr_free_now:14094 [ 6571.059490] CrBrowserMain: page allocation failure: order:0, mode:0x280020 [ 6571.066345] CPU: 1 PID: 20819 Comm: CrBrowserMain Tainted: G O 3.10.0+ #14 [ 6571.074054] Backtrace: [ 6571.076529] [<c00129f8>] (dump_backtrace+0x0/0x114) from [<c0012c68>] (show_stack+0x20/0x24) [ 6571.084932] r6:c262a000 r5:00000000 r4:00280020 r3:271ae71c [ 6571.090649] [<c0012c48>] (show_stack+0x0/0x24) from [<c056d32c>] (dump_stack+0x24/0x28) [ 6571.098628] [<c056d308>] (dump_stack+0x0/0x28) from [<c010c668>] (warn_alloc_failed+0xec/0x128) [ 6571.107305] [<c010c57c>] (warn_alloc_failed+0x0/0x128) from [<c010fd58>] (__alloc_pages_nodemask+0x748/0x97c) [ 6571.117176] r3:00000000 r2:00000000 [ 6571.120770] r7:c07fe240 r6:00000000 r5:00000000 r4:00280020 [ 6571.126485] [<c010f610>] (__alloc_pages_nodemask+0x0/0x97c) from [<c0141ca4>] (new_slab+0x22c/0x2a8) [ 6571.135589] [<c0141a78>] (new_slab+0x0/0x2a8) from [<c01440f8>] (__slab_alloc.isra.61.constprop.69+0x588/0x760) [ 6571.145636] r8:c07c7cc4 r7:cf4fcc00 r6:c1d2aa08 r5:00000020 r4:00000000 [ 6571.152401] [<c0143b70>] (__slab_alloc.isra.61.constprop.69+0x0/0x760) from [<c0144650>] (kmem_cache_alloc+0x184/0x1c0) [ 6571.163142] [<c01444cc>] (kmem_cache_alloc+0x0/0x1c0) from [<c01efb34>] (__es_insert_extent+0xc4/0x274) [ 6571.172494] [<c01efa70>] (__es_insert_extent+0x0/0x274) from [<c01f087c>] (ext4_es_insert_extent+0x128/0x134) [ 6571.182377] [<c01f0754>] (ext4_es_insert_extent+0x0/0x134) from [<c01b5cf8>] (ext4_map_blocks+0x220/0x4cc) [ 6571.191990] r9:00000000 r8:00000006 r7:00000000 r6:cd9192c8 r5:00000000 r4:c262bb18 [ 6571.199894] [<c01b5ad8>] (ext4_map_blocks+0x0/0x4cc) from [<c01b6038>] (_ext4_get_block+0x94/0x188) [ 6571.208905] [<c01b5fa4>] (_ext4_get_block+0x0/0x188) from [<c01b6160>] (ext4_get_block+0x34/0x3c) [ 6571.217737] r9:00000000 r8:c262bc40 r7:00000000 r6:000008a6 r5:00000001 r4:00000000 [ 6571.225648] [<c01b612c>] (ext4_get_block+0x0/0x3c) from [<c01873e8>] (do_mpage_readpage+0x5ac/0x748) [ 6571.234748] [<c0186e3c>] (do_mpage_readpage+0x0/0x748) from [<c0187660>] (mpage_readpages+0xdc/0x138) [ 6571.243932] [<c0187584>] (mpage_readpages+0x0/0x138) from [<c01b531c>] (ext4_readpages+0x50/0x54) [ 6571.252774] [<c01b52cc>] (ext4_readpages+0x0/0x54) from [<c0113628>] (__do_page_cache_readahead+0x1ac/0x260) [ 6571.262561] r6:0000369a r5:00000020 r4:c01b52cc r3:00000015 [ 6571.268272] [<c011347c>] (__do_page_cache_readahead+0x0/0x260) from [<c0113d88>] (ra_submit+0x38/0x40) [ 6571.277540] [<c0113d50>] (ra_submit+0x0/0x40) from [<c01097e8>] (filemap_fault+0x3e4/0x438) [ 6571.285862] [<c0109404>] (filemap_fault+0x0/0x438) from [<c012997c>] (__do_fault+0x80/0x5d4) [ 6571.294269] [<c01298fc>] (__do_fault+0x0/0x5d4) from [<c012cbe4>] (handle_pte_fault+0x84/0x6b0) [ 6571.302934] [<c012cb60>] (handle_pte_fault+0x0/0x6b0) from [<c012d29c>] (handle_mm_fault+0x8c/0xbc) [ 6571.311950] [<c012d210>] (handle_mm_fault+0x0/0xbc) from [<c057354c>] (do_page_fault+0x310/0x428) [ 6571.320793] [<c057323c>] (do_page_fault+0x0/0x428) from [<c00084b4>] (do_PrefetchAbort+0x44/0xac) [ 6571.329631] [<c0008470>] (do_PrefetchAbort+0x0/0xac) from [<c0571b3c>] (ret_from_exception+0x0/0x10) [ 6571.338724] Exception stack(0xc262bfb0 to 0xc262bff8) [ 6571.343754] bfa0: ab718d50 00000000 00000000 00000000 [ 6571.351903] bfc0: ab718d50 ab7195b8 ab719108 b5e7ccb8 00000000 ab718c98 01120514 0118ca80 [ 6571.360050] bfe0: 00000000 ab718c80 b2e2d945 b30e56d8 40000170 ffffffff 5a5a5a5a [ 6571.367417] r8:00000000 r7:b5e7ccb8 r6:ffffffff r5:40000170 r4:b30e56d8 [ 6571.374173] Mem-info: [ 6571.376437] Normal per-cpu: [ 6571.379220] CPU 0: hi: 90, btch: 15 usd: 11 [ 6571.383988] CPU 1: hi: 90, btch: 15 usd: 21 [ 6571.388757] HighMem per-cpu: [ 6571.391626] CPU 0: hi: 18, btch: 3 usd: 1 [ 6571.396395] CPU 1: hi: 18, btch: 3 usd: 2 [ 6571.401173] active_anon:54429 inactive_anon:1744 isolated_anon:0 [ 6571.401173] active_file:2226 inactive_file:3338 isolated_file:0 [ 6571.401173] unevictable:0 dirty:44 writeback:0 unstable:0 [ 6571.401173] free:14094 slab_reclaimable:1380 slab_unreclaimable:6532 [ 6571.401173] mapped:4755 shmem:1772 pagetables:1106 bounce:0 [ 6571.401173] free_cma:13863 [ 6571.433364] Normal free:56088kB min:2000kB low:2500kB high:3000kB active_anon:148332kB inactive_anon:6040kB active_file:1356kB inactive_file:5240kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:329728kB managed:250408kB mlocked:0kB dirty:120kB writeback:0kB mapped:8108kB shmem:6136kB slab_reclaimable:5520kB slab_unreclaimable:26128kB kernel_stack:2720kB pagetables:4424kB unstable:0kB bounce:0kB free_cma:55452kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no [ 6571.475821] lowmem_reserve[]: 0 696 696 [ 6571.479723] HighMem free:288kB min:128kB low:304kB high:480kB active_anon:69384kB inactive_anon:936kB active_file:7548kB inactive_file:8112kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:89088kB managed:89088kB mlocked:0kB dirty:56kB writeback:0kB mapped:10912kB shmem:952kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:11 all_unreclaimable? no [ 6571.520014] lowmem_reserve[]: 0 0 0 [ 6571.523557] Normal: 2152*4kB (UEC) [ 6571.526570] nr_free_before:14094 nr_free_now:14094 [ 6571.526576] nr_free_before:14094 nr_free_now:14094 [ 6571.526581] nr_free_before:14094 nr_free_now:14094 [ 6571.526586] nr_free_before:14094 nr_free_now:14094 [ 6571.526592] opera_omi: page allocation failure: order:0, mode:0x20 [ 6571.526600] CPU: 0 PID: 20846 Comm: opera_omi Tainted: G O 3.10.0+ #14 [ 6571.526605] Backtrace: [ 6571.526625] [<c00129f8>] (dump_backtrace+0x0/0x114) from [<c0012c68>] (show_stack+0x20/0x24) [ 6571.526630] r6:ca01e000 r5:00000000 r4:00000020 r3:271ae71c [ 6571.526654] [<c0012c48>] (show_stack+0x0/0x24) from [<c056d32c>] (dump_stack+0x24/0x28) [ 6571.526666] [<c056d308>] (dump_stack+0x0/0x28) from [<c010c668>] (warn_alloc_failed+0xec/0x128) [ 6571.526679] [<c010c57c>] (warn_alloc_failed+0x0/0x128) from [<c010fd58>] (__alloc_pages_nodemask+0x748/0x97c) [ 6571.526685] r3:00000000 r2:00000000 [ 6571.526691] r7:c07fe240 r6:00000000 r5:00000000 r4:00000020 [ 6571.526711] [<c010f610>] (__alloc_pages_nodemask+0x0/0x97c) from [<c043ec04>] (__netdev_alloc_frag+0x1cc/0x1e8) [ 6571.526722] [<c043ea38>] (__netdev_alloc_frag+0x0/0x1e8) from [<c04412cc>] (__netdev_alloc_skb+0x84/0xe0) [ 6571.527153] [<c0441248>] (__netdev_alloc_skb+0x0/0xe0) from [<bfbf834c>] (_rtw_skb_alloc+0x3c/0x40 [8812au]) [ 6571.527162] r6:0000007a r5:d4899168 r4:000000b6 r3:00000100 [ 6571.527577] [<bfbf8310>] (_rtw_skb_alloc+0x0/0x40 [8812au]) from [<bfc0bc80>] (rtw_os_alloc_recvframe+0x6c/0xfc [8812au]) [ 6571.528001] [<bfc0bc14>] (rtw_os_alloc_recvframe+0x0/0xfc [8812au]) from [<bfc4ea2c>] (recvbuf2recvframe+0x234/0x388 [8812au]) [ 6571.528401] [<bfc4e7f8>] (recvbuf2recvframe+0x0/0x388 [8812au]) from [<bfbff438>] (usb_recv_tasklet+0x6c/0x94 [8812au]) [ 6571.528590] [<bfbff3cc>] (usb_recv_tasklet+0x0/0x94 [8812au]) from [<c002de24>] (tasklet_action+0xa8/0x178) [ 6571.528596] r7:c07b25ec r6:00000000 r5:d4809b5c r4:d4809b58 [ 6571.528614] [<c002dd7c>] (tasklet_action+0x0/0x178) from [<c002cdd0>] (__do_softirq+0x164/0x344) [ 6571.528619] r8:cd919484 r7:00000018 r6:c07b8098 r5:ca01e000 r4:00000006 [ 6571.528631] r3:c002dd7c [ 6571.528641] [<c002cc6c>] (__do_softirq+0x0/0x344) from [<c002d530>] (irq_exit+0xbc/0xf0) [ 6571.528653] [<c002d474>] (irq_exit+0x0/0xf0) from [<c000eda0>] (handle_IRQ+0x54/0xa0) [ 6571.528658] r5:00000056 r4:c07b3f40 [ 6571.528670] [<c000ed4c>] (handle_IRQ+0x0/0xa0) from [<c0008594>] (gic_handle_irq+0x3c/0x6c) [ 6571.528674] r6:ca01fa00 r5:c07c82cc r4:feffe10c r3:00000000 [ 6571.528692] [<c0008558>] (gic_handle_irq+0x0/0x6c) from [<c0571744>] (__irq_svc+0x44/0x78) [ 6571.528698] Exception stack(0xca01fa00 to 0xca01fa48) [ 6571.528707] fa00: cd919484 00000000 deaf1eed 80000001 cd919484 ca01fac0 00003175 00000000 [ 6571.528716] fa20: cd919484 00000000 0000000c ca01fa5c ca01fa60 ca01fa48 c0570e0c c0294ee8 [ 6571.528722] fa40: 880f0153 ffffffff 00000000 [ 6571.528726] r7:ca01fa34 r6:ffffffff r5:880f0153 r4:c0294ee8 [ 6571.528748] [<c0294eb4>] (do_raw_read_lock+0x0/0x54) from [<c0570e0c>] (_raw_read_lock+0x28/0x2c) [ 6571.528753] r4:cd919484 r3:00000000 [ 6571.528766] [<c0570de4>] (_raw_read_lock+0x0/0x2c) from [<c01f0940>] (ext4_es_lookup_extent+0x30/0x1dc) [ 6571.528771] r4:cd9192c8 r3:00000000 [ 6571.528787] [<c01f0910>] (ext4_es_lookup_extent+0x0/0x1dc) from [<c01b5b18>] (ext4_map_blocks+0x40/0x4cc) [ 6571.528792] r8:00000000 r7:00000000 r6:cd9192c8 r5:00000000 r4:ca01fb18 [ 6571.528804] r3:00000000 [ 6571.528816] [<c01b5ad8>] (ext4_map_blocks+0x0/0x4cc) from [<c01b6038>] (_ext4_get_block+0x94/0x188) [ 6571.528827] [<c01b5fa4>] (_ext4_get_block+0x0/0x188) from [<c01b6160>] (ext4_get_block+0x34/0x3c) [ 6571.528832] r9:00000000 r8:ca01fc40 r7:00000000 r6:00003175 r5:00000001 [ 6571.528845] r4:00000000 [ 6571.528859] [<c01b612c>] (ext4_get_block+0x0/0x3c) from [<c01873e8>] (do_mpage_readpage+0x5ac/0x748) [ 6571.528871] [<c0186e3c>] (do_mpage_readpage+0x0/0x748) from [<c0187660>] (mpage_readpages+0xdc/0x138) [ 6571.528883] [<c0187584>] (mpage_readpages+0x0/0x138) from [<c01b531c>] (ext4_readpages+0x50/0x54) [ 6571.528898] [<c01b52cc>] (ext4_readpages+0x0/0x54) from [<c0113628>] (__do_page_cache_readahead+0x1ac/0x260) [ 6571.528903] r6:0000369a r5:00000020 r4:c01b52cc r3:00000014 [ 6571.528922] [<c011347c>] (__do_page_cache_readahead+0x0/0x260) from [<c0113d88>] (ra_submit+0x38/0x40) [ 6571.528932] [<c0113d50>] (ra_submit+0x0/0x40) from [<c01097e8>] (filemap_fault+0x3e4/0x438) [ 6571.528943] [<c0109404>] (filemap_fault+0x0/0x438) from [<c012997c>] (__do_fault+0x80/0x5d4) [ 6571.528953] [<c01298fc>] (__do_fault+0x0/0x5d4) from [<c012cbe4>] (handle_pte_fault+0x84/0x6b0) [ 6571.528963] [<c012cb60>] (handle_pte_fault+0x0/0x6b0) from [<c012d29c>] (handle_mm_fault+0x8c/0xbc) [ 6571.528975] [<c012d210>] (handle_mm_fault+0x0/0xbc) from [<c057354c>] (do_page_fault+0x310/0x428) [ 6571.528985] [<c057323c>] (do_page_fault+0x0/0x428) from [<c000840c>] (do_DataAbort+0x48/0xac) [ 6571.528994] [<c00083c4>] (do_DataAbort+0x0/0xac) from [<c05718dc>] (__dabt_usr+0x3c/0x40) [ 6571.529000] Exception stack(0xca01ffb0 to 0xca01fff8) [ 6571.529006] ffa0: 599ccd49 b59735cc 000048c4 b5e3784c [ 6571.529016] ffc0: 019e6fc8 b5e24cb8 00100080 00000000 be539aec 0196fc00 be5399e0 019e6fc8 [ 6571.529024] ffe0: 00020817 be5398a0 b3bd4765 b3cf394a 280f0170 ffffffff ff131313 [ 6571.529028] r8:be539aec r7:00000000 r6:ffffffff r5:280f0170 r4:b3cf394a [ 6571.529042] Mem-info: [ 6571.529045] Normal per-cpu: [ 6571.529050] CPU 0: hi: 90, btch: 15 usd: 11 [ 6571.529056] CPU 1: hi: 90, btch: 15 usd: 21 [ 6571.529059] HighMem per-cpu: [ 6571.529063] CPU 0: hi: 18, btch: 3 usd: 1 [ 6571.529067] CPU 1: hi: 18, btch: 3 usd: 2 [ 6571.529080] active_anon:54429 inactive_anon:1744 isolated_anon:0 [ 6571.529080] active_file:2226 inactive_file:3338 isolated_file:0 [ 6571.529080] unevictable:0 dirty:44 writeback:0 unstable:0 [ 6571.529080] free:14094 slab_reclaimable:1380 slab_unreclaimable:6532 [ 6571.529080] mapped:4755 shmem:1772 pagetables:1106 bounce:0 [ 6571.529080] free_cma:13863 [ 6571.529104] Normal free:56088kB min:2000kB low:2500kB high:3000kB active_anon:148332kB inactive_anon:6040kB active_file:1356kB inactive_file:5240kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:329728kB managed:250408kB mlocked:0kB dirty:120kB writeback:0kB mapped:8108kB shmem:6136kB slab_reclaimable:5520kB slab_unreclaimable:26128kB kernel_stack:2720kB pagetables:4424kB unstable:0kB bounce:0kB free_cma:55452kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no [ 6571.529118] lowmem_reserve[]: 0 696 696 [ 6571.529142] HighMem free:288kB min:128kB low:304kB high:480kB active_anon:69384kB inactive_anon:936kB active_file:7548kB inactive_file:8112kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:89088kB managed:89088kB mlocked:0kB dirty:56kB writeback:0kB mapped:10912kB shmem:952kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:11 all_unreclaimable? no [ 6571.529155] lowmem_reserve[]: 0 0 0 [ 6571.529164] Normal: 2152*4kB (UEC) 2157*8kB (UEC) 1889*16kB (UEC) 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 56088kB [ 6571.529199] HighMem: 10*4kB (R) 21*8kB (R) 1*16kB (R) 0*32kB 1*64kB (R) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 288kB [ 6571.529234] 7360 total pagecache pages [ 6571.529241] 0 pages in swap cache [ 6571.529245] Swap cache stats: add 0, delete 0, find 0/0 [ 6571.529248] Free swap = 0kB [ 6571.529250] Total swap = 0kB [ 6571.529649] RTL871X: rtw_os_alloc_recvframe:can not allocate memory for skb copy [ 6571.529658] RTL871X: pre_recv_entry()-274: alloc_skb() failed!
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 3366092..5e7487a 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2414,6 +2414,8 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, bool sync_migration = false; bool deferred_compaction = false; bool contended_compaction = false; + unsigned long nr_free_before; + nr_free_before = global_page_state(NR_FREE_PAGES); /* * In the slowpath, we sanity check order to avoid ever trying to @@ -2597,6 +2599,7 @@ rebalance: } nopage: + printk(KERN_ERR"nr_free_before:%lu nr_free_now:%lu\n", nr_free_before, global_page_state(NR_FREE_PAGES)); warn_alloc_failed(gfp_mask, order, NULL); return page; got_pg: