- 论坛徽章:
- 0
|
本帖最后由 chenshko 于 2011-09-15 10:00 编辑
在netfilter中构建nskb失败
跟踪发现是alloc_skb失败,一下内核所记录的函数调用栈日志,求高人分析下alloc_skb失败的可能原因。
内核打印了meminfo信息,难到跟swap内存空间的大小有关?- Sep 14 12:24:10 localhost kernel: swapper: page allocation failure. order:0, mode:0x20
- Sep 14 12:24:10 localhost kernel: Pid: 0, comm: swapper Not tainted 2.6.29.6NFQ #18
- Sep 14 12:24:10 localhost kernel: Call Trace:
- Sep 14 12:24:10 localhost kernel: [<c015cec4>] __alloc_pages_internal+0x351/0x363
- Sep 14 12:24:10 localhost kernel: [<c0178d53>] allocate_slab+0x55/0xa0
- Sep 14 12:24:10 localhost kernel: [<c0178dd6>] new_slab+0x1f/0xff
- Sep 14 12:24:10 localhost kernel: [<c0179272>] __slab_alloc+0xab/0x14d
- Sep 14 12:24:10 localhost kernel: [<c0179370>] kmem_cache_alloc+0x5c/0x9f
- Sep 14 12:24:10 localhost kernel: [<c02dcdb8>] __alloc_skb+0x25/0xef
- Sep 14 12:24:10 localhost last message repeated 2 times
- Sep 14 12:24:10 localhost kernel: [<c02fa566>] nfqnl_build_packet_message+0xb7/0x499
- Sep 14 12:24:10 localhost kernel: [<c02fdc84>] __nf_ct_refresh_acct+0x116/0x157
- Sep 14 12:24:11 localhost kernel: [<f85b9582>] ipt_do_table+0x410/0x42f [ip_tables]
- Sep 14 12:24:11 localhost kernel: [<c02fab4d>] qzt_nfqnl_enqueue_packet+0x13/0x194
- Sep 14 12:24:11 localhost kernel: [<c02f9b7c>] __nf_queue+0x131/0x15e
- Sep 14 12:24:11 localhost kernel: [<c0308565>] ip_rcv_finish+0x0/0x25b
- Sep 14 12:24:11 localhost kernel: [<c02f96aa>] nf_hook_slow+0xa0/0xb4
- Sep 14 12:24:11 localhost kernel: [<c0308565>] ip_rcv_finish+0x0/0x25b
- Sep 14 12:24:11 localhost kernel: [<c030899d>] ip_rcv+0x1dd/0x214
- Sep 14 12:24:11 localhost kernel: [<c0308565>] ip_rcv_finish+0x0/0x25b
- Sep 14 12:24:11 localhost kernel: [<c02e424b>] netif_receive_skb+0x279/0x29d
- Sep 14 12:24:11 localhost kernel: [<f8226026>] rtl8139_rx+0x197/0x260 [8139too]
- Sep 14 12:24:11 localhost kernel: [<f8226271>] rtl8139_poll+0x49/0xa0 [8139too]
- Sep 14 12:24:11 localhost kernel: [<c02e4a35>] net_rx_action+0x9b/0x168
- Sep 14 12:24:11 localhost kernel: [<c012a9de>] __do_softirq+0x72/0xf2
- Sep 14 12:24:11 localhost kernel: [<c012a96c>] __do_softirq+0x0/0xf2
- Sep 14 12:24:11 localhost kernel: <IRQ> [<c0104664>] do_IRQ+0xc4/0xd8
- Sep 14 12:24:11 localhost kernel: [<c0103527>] common_interrupt+0x27/0x2c
- Sep 14 12:24:11 localhost kernel: [<c0107edf>] mwait_idle+0x4d/0x55
- Sep 14 12:24:11 localhost kernel: [<c01017d6>] cpu_idle+0x4c/0x60
- Sep 14 12:24:11 localhost kernel: Mem-Info:
- Sep 14 12:24:11 localhost kernel: DMA per-cpu:
- Sep 14 12:24:11 localhost kernel: CPU 0: hi: 0, btch: 1 usd: 0
- Sep 14 12:24:11 localhost kernel: CPU 1: hi: 0, btch: 1 usd: 0
- Sep 14 12:24:11 localhost kernel: Normal per-cpu:
- Sep 14 12:24:11 localhost kernel: CPU 0: hi: 186, btch: 31 usd: 67
- Sep 14 12:24:11 localhost kernel: CPU 1: hi: 186, btch: 31 usd: 60
- Sep 14 12:24:11 localhost kernel: HighMem per-cpu:
- Sep 14 12:24:11 localhost kernel: CPU 0: hi: 42, btch: 7 usd: 5
- Sep 14 12:24:11 localhost kernel: CPU 1: hi: 42, btch: 7 usd: 0
- Sep 14 12:24:11 localhost kernel: Active_anon:3242 active_file:1444 inactive_anon:3583
- Sep 14 12:24:11 localhost kernel: inactive_file:5238 unevictable:128 dirty:0 writeback:0 unstable:0
- Sep 14 12:24:11 localhost kernel: free:13114 slab:216699 mapped:2081 pagetables:312 bounce:0
- Sep 14 12:24:11 localhost kernel: DMA free:3476kB min:64kB low:80kB high:96kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB present:15772kB pages_scanned:0 all_unreclaimable? yes
- Sep 14 12:24:11 localhost kernel: lowmem_reserve[]: 0 863 965 965
- Sep 14 12:24:11 localhost kernel: Normal free:1392kB min:3724kB low:4652kB high:5584kB active_anon:48kB inactive_anon:64kB active_file:112kB inactive_file:0kB unevictable:0kB present:884200kB pages_scanned:270 all_unreclaimable? yes
- Sep 14 12:24:11 localhost kernel: lowmem_reserve[]: 0 0 815 815
- Sep 14 12:24:11 localhost kernel: HighMem free:47588kB min:128kB low:236kB high:344kB active_anon:12920kB inactive_anon:14268kB active_file:5664kB inactive_file:20952kB unevictable:512kB present:104384kB pages_scanned:0 all_unreclaimable? no
- Sep 14 12:24:11 localhost kernel: lowmem_reserve[]: 0 0 0 0
- Sep 14 12:24:11 localhost kernel: DMA: 7*4kB 5*8kB 5*16kB 2*32kB 5*64kB 3*128kB 2*256kB 0*512kB 0*1024kB 1*2048kB 0*4096kB = 3476kB
- Sep 14 12:24:11 localhost kernel: Normal: 283*4kB 0*8kB 1*16kB 1*32kB 1*64kB 1*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 1372kB
- Sep 14 12:24:11 localhost kernel: HighMem: 1021*4kB 1018*8kB 567*16kB 323*32kB 183*64kB 27*128kB 1*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 47572kB
- Sep 14 12:24:11 localhost kernel: 7157 total pagecache pages
- Sep 14 12:24:11 localhost kernel: 287 pages in swap cache
- Sep 14 12:24:11 localhost kernel: Swap cache stats: add 15378, delete 15091, find 63/105
- Sep 14 12:24:11 localhost kernel: Free swap = 2309420kB
- Sep 14 12:24:11 localhost kernel: Total swap = 2369576kB
- Sep 14 12:24:11 localhost kernel: 253664 pages RAM
- Sep 14 12:24:11 localhost kernel: 26354 pages HighMem
- Sep 14 12:24:11 localhost kernel: 5044 pages reserved
- Sep 14 12:24:11 localhost kernel: 7140 pages shared
- Sep 14 12:24:11 localhost kernel: 231054 pages non-shared
复制代码 |
|