ENGR00277698 net:fec: avoid kernel dump for skb page allocation fail
Fast reproduce steps:
1. set kernel parameter mem=500M, after kernel up, run below steps.
1. mount 10.192.225.224:/nfsroot /media/Videos/224nfsroot -t nfs
-o rw,nolock,addr=10.192.225.224
2. cd /media/Videos/224nfsroot/gst-sanity-test
3. ./linux_recording_sanity_test.sh recording_playback_cmd.txt
kernel dump:
--------------------------------------------------------------
Swap cache stats: add 0, delete 0, find 0/0
Free swap = 0kB
Total swap = 0kB
kswapd0: page allocation failure: order:0, mode:0x20
CPU: 0 PID: 54 Comm: kswapd0 Tainted: G W
3.10.17-16884-gc530ac0 #239
[<
80013c4c>] (unwind_backtrace+0x0/0xf8) from [<
80011704>] (show_stack+0x10/0x14)
[<
80011704>] (show_stack+0x10/0x14) from [<
8008bb7c>] (warn_alloc_failed+0xd0/0x114)
[<
8008bb7c>] (warn_alloc_failed+0xd0/0x114) from [<
8008e860>] (__alloc_pages_nodemask+0x5e0/0x8b8)
[<
8008e860>] (__alloc_pages_nodemask+0x5e0/0x8b8) from [<
804cceb8>] (__netdev_alloc_frag+0x9c/0x138)
[<
804cceb8>] (__netdev_alloc_frag+0x9c/0x138) from [<
804cddc4>] (__netdev_alloc_skb+0x40/0xe0)
[<
804cddc4>] (__netdev_alloc_skb+0x40/0xe0) from [<
8037dc8c>] (fec_enet_rx_napi+0x268/0x7e0)
[<
8037dc8c>] (fec_enet_rx_napi+0x268/0x7e0) from [<
804d7cf8>] (net_rx_action+0x94/0x160)
[<
804d7cf8>] (net_rx_action+0x94/0x160) from [<
8002c8fc>] (__do_softirq+0xe8/0x1d0)
[<
8002c8fc>] (__do_softirq+0xe8/0x1d0) from [<
8002ca8c>] (do_softirq+0x4c/0x58)
[<
8002ca8c>] (do_softirq+0x4c/0x58) from [<
8002ccf4>] (irq_exit+0x90/0xc8)
[<
8002ccf4>] (irq_exit+0x90/0xc8) from [<
8000ea88>] (handle_IRQ+0x3c/0x94)
[<
8000ea88>] (handle_IRQ+0x3c/0x94) from [<
8000855c>] (gic_handle_irq+0x28/0x5c)
[<
8000855c>] (gic_handle_irq+0x28/0x5c) from [<
8000de00>] (__irq_svc+0x40/0x50)
Exception stack(0xac21be08 to 0xac21be50)
be00:
80ca16f0 00000000 0000bf28 0000bf28 80ca16c8 ac449c00
be20:
000006a4 00000000 00000000 00000000 000003a4 00000000 00000000 ac21be50
be40:
800bf9e4 805fc0d4 600f0013 ffffffff
[<
8000de00>] (__irq_svc+0x40/0x50) from [<
805fc0d4>] (_raw_spin_lock+0x38/0x3c)
[<
805fc0d4>] (_raw_spin_lock+0x38/0x3c) from [<
800bf9e4>] (put_super+0x18/0x3c)
[<
800bf9e4>] (put_super+0x18/0x3c) from [<
800c0968>] (prune_super+0x13c/0x17c)
[<
800c0968>] (prune_super+0x13c/0x17c) from [<
80093ff8>] (shrink_slab+0x88/0x218)
[<
80093ff8>] (shrink_slab+0x88/0x218) from [<
8009637c>] (kswapd+0x510/0x80c)
[<
8009637c>] (kswapd+0x510/0x80c) from [<
80042d64>] (kthread+0xa4/0xb0)
[<
80042d64>] (kthread+0xa4/0xb0) from [<
8000e258>] (ret_from_fork+0x14/0x3c)
--------------------------------------------------------------
Firstly, alloc_page() try to allocate page from pcp high speed cached page or
free_list by calling get_page_from_freelist(). If failed, and then use low
speed allocation mechanism by calling __alloc_pages_slowpath(), which may
allocate from reclaimed pages and kernel dump the memory allocate info.
Still don't find the root cause, this patch avoid the kernel dump
in temporarily.
Signed-off-by: Fugang Duan <B38611@freescale.com>