hi all: I got something wired that 1. in softirq, there is a page order 0 allocation request 2. Normal/High zone are free enough for order 0 page. 3. but somehow kernel return order 0 allocation fail. My kernel version is 3.10 and below is kernel log: from memory info, the usd of pcb in Norma/High is > 0 [ 8606.703526] Mem-info: [ 8606.703530] Normal per-cpu: [ 8606.703535] CPU 0: hi: 90, btch: 15 usd: 10 [ 8606.703540] CPU 1: hi: 90, btch: 15 usd: 47 [ 8606.703543] HighMem per-cpu: [ 8606.703547] CPU 0: hi: 18, btch: 3 usd: 2 [ 8606.703551] CPU 1: hi: 18, btch: 3 usd: 2 the free memory size of Normal is [ 8606.703590] Normal free:60684kB the free memory size of Highmem is [ 8606.703625] HighMem free:300kB I trace mm/page_alloc.c the page order 0 allocation will follow below path. a. if pcp->count !=0, the page will directly get from pre-allocated list. b. if pcp->count ==0, the page will allocated from budy system if it is still get free pages enough. in my case, both a) and b) the page allocation should be ok. But why kernel still reject the order 0 page allocation? appreciate your kind help in advance, get_page_from_freelist --> buffered_rmqueue --> if (likely(order == 0)) { struct per_cpu_pages *pcp; struct list_head *list; local_irq_save(flags); pcp = &this_cpu_ptr(zone->pageset)->pcp; list = &pcp->lists[migratetype]; if (list_empty(list)) { pcp->count += rmqueue_bulk(zone, 0, pcp->batch, list, migratetype, cold); if (unlikely(list_empty(list))) goto failed; } if (cold) page = list_entry(list->prev, struct page, lru); else page = list_entry(list->next, struct page, lru); list_del(&page->lru); pcp->count--; [ 8606.701343] CompositorTileW: page allocation failure: order:0, mode:0x20 [ 8606.701356] CPU: 0 PID: 26064 Comm: CompositorTileW Tainted: G O 3.10.0+ #2 [ 8606.701365] Backtrace: [ 8606.701390] [<c00129f8>] (dump_backtrace+0x0/0x114) from [<c0012c68>] (show_stack+0x20/0x24) [ 8606.701403] r6:c9bee000 r5:00000000 r4:00000020 r3:271ae71c [ 8606.701419] [<c0012c48>] (show_stack+0x0/0x24) from [<c056d2ec>] (dump_stack+0x24/0x28) [ 8606.701434] [<c056d2c8>] (dump_stack+0x0/0x28) from [<c010c668>] (warn_alloc_failed+0xec/0x128) [ 8606.701447] [<c010c57c>] (warn_alloc_failed+0x0/0x128) from [<c010fd1c>] (__alloc_pages_nodemask+0x70c/0x940) [ 8606.701456] r3:00000000 r2:00000000 [ 8606.701466] r7:c07fe240 r6:00000000 r5:00000000 r4:00000020 [ 8606.701476] [<c010f610>] (__alloc_pages_nodemask+0x0/0x940) from [<c043ebc4>] (__netdev_alloc_frag+0x1cc/0x1e8) [ 8606.701487] [<c043e9f8>] (__netdev_alloc_frag+0x0/0x1e8) from [<c044128c>] (__netdev_alloc_skb+0x84/0xe0) [ 8606.701943] [<c0441208>] (__netdev_alloc_skb+0x0/0xe0) from [<bfbf834c>] (_rtw_skb_alloc+0x3c/0x40 [8812au]) [ 8606.701958] r6:0000060e r5:d4af3160 r4:0000064a r3:00000100 [ 8606.702374] [<bfbf8310>] (_rtw_skb_alloc+0x0/0x40 [8812au]) from [<bfc0bc80>] (rtw_os_alloc_recvframe+0x6c/0xfc [8812au]) [ 8606.702795] [<bfc0bc14>] (rtw_os_alloc_recvframe+0x0/0xfc [8812au]) from [<bfc4eb64>] (recvbuf2recvframe+0x36c/0x388 [8812au]) [ 8606.703193] [<bfc4e7f8>] (recvbuf2recvframe+0x0/0x388 [8812au]) from [<bfbff438>] (usb_recv_tasklet+0x6c/0x94 [8812au]) [ 8606.703385] [<bfbff3cc>] (usb_recv_tasklet+0x0/0x94 [8812au]) from [<c002de24>] (tasklet_action+0xa8/0x178) [ 8606.703398] r7:c07b25ec r6:00000000 r5:d4809b5c r4:d4809b58 [ 8606.703407] [<c002dd7c>] (tasklet_action+0x0/0x178) from [<c002cdd0>] (__do_softirq+0x164/0x344) [ 8606.703423] r8:00000008 r7:00000018 r6:c07b8098 r5:c9bee000 r4:00000006 [ 8606.703423] r3:c002dd7c [ 8606.703431] [<c002cc6c>] (__do_softirq+0x0/0x344) from [<c002d530>] (irq_exit+0xbc/0xf0) [ 8606.703444] [<c002d474>] (irq_exit+0x0/0xf0) from [<c000eda0>] (handle_IRQ+0x54/0xa0) [ 8606.703452] r5:00000056 r4:c07b3f40 [ 8606.703460] [<c000ed4c>] (handle_IRQ+0x0/0xa0) from [<c0008594>] (gic_handle_irq+0x3c/0x6c) [ 8606.703472] r6:c9beffb0 r5:c07c82cc r4:feffe10c r3:00000000 [ 8606.703483] [<c0008558>] (gic_handle_irq+0x0/0x6c) from [<c05718e4>] (__irq_usr+0x44/0x60) [ 8606.703489] Exception stack(0xc9beffb0 to 0xc9befff8) [ 8606.703495] ffa0: 00000001 01581600 20e8fcf6 00000001 [ 8606.703504] ffc0: 00000013 4fb149a0 00000007 ffffffff 00000008 00000001 00000009 01580bc4 [ 8606.703512] ffe0: 0000000c b015afa0 b5de0cb8 b36b74c8 00070170 ffffffff ff121212 [ 8606.703524] r7:ffffffff r6:ffffffff r5:00070170 r4:b36b74c8 [ 8606.703526] Mem-info: [ 8606.703530] Normal per-cpu: [ 8606.703535] CPU 0: hi: 90, btch: 15 usd: 10 [ 8606.703540] CPU 1: hi: 90, btch: 15 usd: 47 [ 8606.703543] HighMem per-cpu: [ 8606.703547] CPU 0: hi: 18, btch: 3 usd: 2 [ 8606.703551] CPU 1: hi: 18, btch: 3 usd: 2 [ 8606.703564] active_anon:31649 inactive_anon:6232 isolated_anon:0 [ 8606.703564] active_file:4303 inactive_file:17299 isolated_file:0 [ 8606.703564] unevictable:0 dirty:146 writeback:0 unstable:0 [ 8606.703564] free:15246 slab_reclaimable:1469 slab_unreclaimable:6629 [ 8606.703564] mapped:17380 shmem:6266 pagetables:884 bounce:0 [ 8606.703564] free_cma:14991 [ 8606.703590] Normal free:60684kB min:2000kB low:2500kB high:3000kB active_anon:84188kB inactive_anon:24032kB active_file:7632kB inactive_file:34812kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:329728kB managed:250408kB mlocked:0kB dirty:568kB writeback:0kB mapped:43124kB shmem:24148kB slab_reclaimable:5876kB slab_unreclaimable:26516kB kernel_stack:2656kB pagetables:3536kB unstable:0kB bounce:0kB free_cma:59964kB writeback_tmp:0kB pages_scanned:68 all_unreclaimable? no [ 8606.703610] lowmem_reserve[]: 0 696 696 [ 8606.703625] HighMem free:300kB min:128kB low:304kB high:480kB active_anon:42408kB inactive_anon:896kB active_file:9580kB inactive_file:34384kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:89088kB managed:89088kB mlocked:0kB dirty:16kB writeback:0kB mapped:26396kB shmem:916kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no [ 8606.703644] lowmem_reserve[]: 0 0 0 [ 8606.703676] Normal: 1013*4kB (UC) 1013*8kB (UMC) 1013*16kB (UC) 1002*32kB (UC) 4*64kB (U) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 60684kB [ 8606.703706] HighMem: 3*4kB (M) 2*8kB (R) 1*16kB (R) 0*32kB 0*64kB 0*128kB 1*256kB (R) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 300kB [ 8606.703708] 27876 total pagecache pages [ 8606.703715] 0 pages in swap cache [ 8606.703719] Swap cache stats: add 0, delete 0, find 0/0 [ 8606.703722] Free swap = 0kB [ 8606.703724] Total swap = 0kB [ 8606.703840] RTL871X: rtw_os_alloc_recvframe:can not allocate memory for skb copy
[ 94.586588] ksoftirqd/0: page allocation failure: order:0, mode:0x20 [ 94.592934] CPU: 0 PID: 3 Comm: ksoftirqd/0 Tainted: G O 3.10.0+ #1 [ 94.600039] Backtrace: [ 94.602512] [<c00129f8>] (dump_backtrace+0x0/0x114) from [<c0012c68>] (show_stack+0x20/0x24) [ 94.610916] r6:cfcb6000 r5:00000000 r4:00000020 r3:271ae71c [ 94.616634] [<c0012c48>] (show_stack+0x0/0x24) from [<c056d2ec>] (dump_stack+0x24/0x28) [ 94.624613] [<c056d2c8>] (dump_stack+0x0/0x28) from [<c010c668>] (warn_alloc_failed+0xec/0x128) [ 94.633285] [<c010c57c>] (warn_alloc_failed+0x0/0x128) from [<c010fd1c>] (__alloc_pages_nodemask+0x70c/0x940) [ 94.643160] r3:00000000 r2:00000000 [ 94.646754] r7:c07fe240 r6:00000000 r5:00000000 r4:00000020 [ 94.652465] [<c010f610>] (__alloc_pages_nodemask+0x0/0x940) from [<c043ebc4>] (__netdev_alloc_frag+0x1cc/0x1e8) [ 94.662511] [<c043e9f8>] (__netdev_alloc_frag+0x0/0x1e8) from [<c044128c>] (__netdev_alloc_skb+0x84/0xe0) [ 94.672506] [<c0441208>] (__netdev_alloc_skb+0x0/0xe0) from [<bfc0134c>] (_rtw_skb_alloc+0x3c/0x40 [8812au]) [ 94.682299] r6:00000046 r5:d4af2ae8 r4:00000082 r3:00000100 [ 94.688631] [<bfc01310>] (_rtw_skb_alloc+0x0/0x40 [8812au]) from [<bfc14c80>] (rtw_os_alloc_recvframe+0x6c/0xfc [8812au]) [ 94.700121] [<bfc14c14>] (rtw_os_alloc_recvframe+0x0/0xfc [8812au]) from [<bfc57a2c>] (recvbuf2recvframe+0x234/0x388 [8812au]) [ 94.712050] [<bfc577f8>] (recvbuf2recvframe+0x0/0x388 [8812au]) from [<bfc08438>] (usb_recv_tasklet+0x6c/0x94 [8812au]) [ 94.723092] [<bfc083cc>] (usb_recv_tasklet+0x0/0x94 [8812au]) from [<c002de24>] (tasklet_action+0xa8/0x178) [ 94.732793] r7:c07b25ec r6:00000000 r5:d4809b5c r4:d4809b58 [ 94.738501] [<c002dd7c>] (tasklet_action+0x0/0x178) from [<c002cdd0>] (__do_softirq+0x164/0x344) [ 94.747245] r8:00000000 r7:00000018 r6:c07b8098 r5:cfcb6000 r4:00000006 r3:c002dd7c [ 94.755148] [<c002cc6c>] (__do_softirq+0x0/0x344) from [<c002d018>] (run_ksoftirqd+0x68/0xdc) [ 94.763644] [<c002cfb0>] (run_ksoftirqd+0x0/0xdc) from [<c0052c34>] (smpboot_thread_fn+0x110/0x240) [ 94.772648] r5:cfc51700 r4:cfcb6000 [ 94.776252] [<c0052b24>] (smpboot_thread_fn+0x0/0x240) from [<c004a108>] (kthread+0xc4/0xc8) [ 94.784656] r8:00000000 r7:c0052b24 r6:cfc51700 r5:00000000 r4:cfcade44 r3:cfca8540 [ 94.792565] [<c004a044>] (kthread+0x0/0xc8) from [<c000e448>] (ret_from_fork+0x14/0x20) [ 94.800537] r7:00000000 r6:00000000 r5:c004a044 r4:cfcade44 [ 94.806239] Mem-info: [ 94.808503] Normal per-cpu: [ 94.811287] CPU 0: hi: 90, btch: 15 usd: 0 [ 94.816056] CPU 1: hi: 90, btch: 15 usd: 14 [ 94.820824] HighMem per-cpu: [ 94.823693] CPU 0: hi: 18, btch: 3 usd: 0 [ 94.828463] CPU 1: hi: 18, btch: 3 usd: 0 [ 94.833240] active_anon:38359 inactive_anon:138 isolated_anon:0 [ 94.833240] active_file:4407 inactive_file:15747 isolated_file:296 [ 94.833240] unevictable:0 dirty:8644 writeback:814 unstable:0 [ 94.833240] free:24064 slab_reclaimable:3878 slab_unreclaimable:5356 [ 94.833240] mapped:6988 shmem:145 pagetables:593 bounce:0 [ 94.833240] free_cma:15770 [ 94.865776] Normal free:63768kB min:2000kB low:2500kB high:3000kB active_anon:128600kB inactive_anon:304kB active_file:14044kB inactive_file:36708kB unevictable:0kB isolated(anon):0kB isolated(file):1184kB present:329728kB managed:250408kB mlocked:0kB dirty:34576kB writeback:3256kB mapped:12260kB shmem:308kB slab_reclaimable:15512kB slab_unreclaimable:21424kB kernel_stack:2392kB pagetables:2372kB unstable:0kB bounce:0kB free_cma:63080kB writeback_tmp:0kB pages_scanned:599 all_unreclaimable? no [ 94.909270] lowmem_reserve[]: 0 696 696 [ 94.913172] HighMem free:32460kB min:128kB low:304kB high:480kB active_anon:24836kB inactive_anon:248kB active_file:3584kB inactive_file:26316kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:89088kB managed:89088kB mlocked:0kB dirty:0kB writeback:0kB mapped:15692kB shmem:272kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no [ 94.953550] lowmem_reserve[]: 0 0 0 [ 94.957093] Normal: 390*4kB (MC) 226*8kB (C) 225*16kB (C) 226*32kB (C) 226*64kB (C) 226*128kB (C) 14*256kB (C) 5*512kB (C) 0*1024kB 0*2048kB 0*4096kB = 63736kB [ 94.971626] HighMem: 1055*4kB (MR) 553*8kB (UMR) 231*16kB (UMR) 123*32kB (UMR) 91*64kB (UMR) 79*128kB (UMR) 1*256kB (R) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 32468kB [ 94.986574] 20588 total pagecache pages [ 94.990397] 0 pages in swap cache [ 94.993702] Swap cache stats: add 0, delete 0, find 0/0 [ 94.998902] Free swap = 0kB [ 95.001770] Total swap = 0kB [ 95.005397] RTL871X: rtw_os_alloc_recvframe:can not allocate memory for skb copy
[ 8606.701343] CompositorTileW: page allocation failure: order:0, mode:0x20 [ 8606.701356] CPU: 0 PID: 26064 Comm: CompositorTileW Tainted: G O 3.10.0+ #2 [ 8606.701365] Backtrace: [ 8606.701390] [<c00129f8>] (dump_backtrace+0x0/0x114) from [<c0012c68>] (show_stack+0x20/0x24) [ 8606.701403] r6:c9bee000 r5:00000000 r4:00000020 r3:271ae71c [ 8606.701419] [<c0012c48>] (show_stack+0x0/0x24) from [<c056d2ec>] (dump_stack+0x24/0x28) [ 8606.701434] [<c056d2c8>] (dump_stack+0x0/0x28) from [<c010c668>] (warn_alloc_failed+0xec/0x128) [ 8606.701447] [<c010c57c>] (warn_alloc_failed+0x0/0x128) from [<c010fd1c>] (__alloc_pages_nodemask+0x70c/0x940) [ 8606.701456] r3:00000000 r2:00000000 [ 8606.701466] r7:c07fe240 r6:00000000 r5:00000000 r4:00000020 [ 8606.701476] [<c010f610>] (__alloc_pages_nodemask+0x0/0x940) from [<c043ebc4>] (__netdev_alloc_frag+0x1cc/0x1e8) [ 8606.701487] [<c043e9f8>] (__netdev_alloc_frag+0x0/0x1e8) from [<c044128c>] (__netdev_alloc_skb+0x84/0xe0) [ 8606.701943] [<c0441208>] (__netdev_alloc_skb+0x0/0xe0) from [<bfbf834c>] (_rtw_skb_alloc+0x3c/0x40 [8812au]) [ 8606.701958] r6:0000060e r5:d4af3160 r4:0000064a r3:00000100 [ 8606.702374] [<bfbf8310>] (_rtw_skb_alloc+0x0/0x40 [8812au]) from [<bfc0bc80>] (rtw_os_alloc_recvframe+0x6c/0xfc [8812au]) [ 8606.702795] [<bfc0bc14>] (rtw_os_alloc_recvframe+0x0/0xfc [8812au]) from [<bfc4eb64>] (recvbuf2recvframe+0x36c/0x388 [8812au]) [ 8606.703193] [<bfc4e7f8>] (recvbuf2recvframe+0x0/0x388 [8812au]) from [<bfbff438>] (usb_recv_tasklet+0x6c/0x94 [8812au]) [ 8606.703385] [<bfbff3cc>] (usb_recv_tasklet+0x0/0x94 [8812au]) from [<c002de24>] (tasklet_action+0xa8/0x178) [ 8606.703398] r7:c07b25ec r6:00000000 r5:d4809b5c r4:d4809b58 [ 8606.703407] [<c002dd7c>] (tasklet_action+0x0/0x178) from [<c002cdd0>] (__do_softirq+0x164/0x344) [ 8606.703423] r8:00000008 r7:00000018 r6:c07b8098 r5:c9bee000 r4:00000006 [ 8606.703423] r3:c002dd7c [ 8606.703431] [<c002cc6c>] (__do_softirq+0x0/0x344) from [<c002d530>] (irq_exit+0xbc/0xf0) [ 8606.703444] [<c002d474>] (irq_exit+0x0/0xf0) from [<c000eda0>] (handle_IRQ+0x54/0xa0) [ 8606.703452] r5:00000056 r4:c07b3f40 [ 8606.703460] [<c000ed4c>] (handle_IRQ+0x0/0xa0) from [<c0008594>] (gic_handle_irq+0x3c/0x6c) [ 8606.703472] r6:c9beffb0 r5:c07c82cc r4:feffe10c r3:00000000 [ 8606.703483] [<c0008558>] (gic_handle_irq+0x0/0x6c) from [<c05718e4>] (__irq_usr+0x44/0x60) [ 8606.703489] Exception stack(0xc9beffb0 to 0xc9befff8) [ 8606.703495] ffa0: 00000001 01581600 20e8fcf6 00000001 [ 8606.703504] ffc0: 00000013 4fb149a0 00000007 ffffffff 00000008 00000001 00000009 01580bc4 [ 8606.703512] ffe0: 0000000c b015afa0 b5de0cb8 b36b74c8 00070170 ffffffff ff121212 [ 8606.703524] r7:ffffffff r6:ffffffff r5:00070170 r4:b36b74c8 [ 8606.703526] Mem-info: [ 8606.703530] Normal per-cpu: [ 8606.703535] CPU 0: hi: 90, btch: 15 usd: 10 [ 8606.703540] CPU 1: hi: 90, btch: 15 usd: 47 [ 8606.703543] HighMem per-cpu: [ 8606.703547] CPU 0: hi: 18, btch: 3 usd: 2 [ 8606.703551] CPU 1: hi: 18, btch: 3 usd: 2 [ 8606.703564] active_anon:31649 inactive_anon:6232 isolated_anon:0 [ 8606.703564] active_file:4303 inactive_file:17299 isolated_file:0 [ 8606.703564] unevictable:0 dirty:146 writeback:0 unstable:0 [ 8606.703564] free:15246 slab_reclaimable:1469 slab_unreclaimable:6629 [ 8606.703564] mapped:17380 shmem:6266 pagetables:884 bounce:0 [ 8606.703564] free_cma:14991 [ 8606.703590] Normal free:60684kB min:2000kB low:2500kB high:3000kB active_anon:84188kB inactive_anon:24032kB active_file:7632kB inactive_file:34812kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:329728kB managed:250408kB mlocked:0kB dirty:568kB writeback:0kB mapped:43124kB shmem:24148kB slab_reclaimable:5876kB slab_unreclaimable:26516kB kernel_stack:2656kB pagetables:3536kB unstable:0kB bounce:0kB free_cma:59964kB writeback_tmp:0kB pages_scanned:68 all_unreclaimable? no [ 8606.703610] lowmem_reserve[]: 0 696 696 [ 8606.703625] HighMem free:300kB min:128kB low:304kB high:480kB active_anon:42408kB inactive_anon:896kB active_file:9580kB inactive_file:34384kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:89088kB managed:89088kB mlocked:0kB dirty:16kB writeback:0kB mapped:26396kB shmem:916kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no [ 8606.703644] lowmem_reserve[]: 0 0 0 [ 8606.703676] Normal: 1013*4kB (UC) 1013*8kB (UMC) 1013*16kB (UC) 1002*32kB (UC) 4*64kB (U) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 60684kB [ 8606.703706] HighMem: 3*4kB (M) 2*8kB (R) 1*16kB (R) 0*32kB 0*64kB 0*128kB 1*256kB (R) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 300kB [ 8606.703708] 27876 total pagecache pages [ 8606.703715] 0 pages in swap cache [ 8606.703719] Swap cache stats: add 0, delete 0, find 0/0 [ 8606.703722] Free swap = 0kB [ 8606.703724] Total swap = 0kB [ 8606.703840] RTL871X: rtw_os_alloc_recvframe:can not allocate memory for skb copy