2

Since the beginning of using my pi , I was getting this error, It's not distro related , I used `raspbmc and now I use Arch. Some peoples told me about memory fragmentation but I don't know much more. For the record I have 126/461 M used of ram , activating a swap doesn't change anything at all.

It happen either or not cpu is massively used, I thought at first that was transmission who cause this but using rtorrent it's the same. Same thought , thinking about having large number of torrent could cause this but even with one or two torrents , this happen too.

It really bug me for many reason , one of them is curiosity. but it also write a lot and a lot of logs so kind of messing up with the lifetime of my usb flash drive.

Jun  8 08:17:43 playbox kernel: [43484.271776]  free:63082 slab_reclaimable:1515 slab_unreclaimable:1694
Jun  8 08:17:43 playbox kernel: [43484.271776]  mapped:15681 shmem:119 pagetables:807 bounce:0
Jun  8 08:17:43 playbox kernel: [43484.271822] Normal free:252328kB min:16384kB low:20480kB high:24576kB active_anon:102828kB inactive_anon:248kB active_file:27060kB inactive_file:44748kB unevictable:5196kB isolated(anon):0kB isolated(file):0kB present:483488kB mlocked:5196kB dirty:884kB writeback:40kB mapped:62724kB shmem:476kB slab_reclaimable:6060kB slab_unreclaimable:6776kB kernel_stack:1032kB pagetables:3228kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:152 all_unreclaimable? no
Jun  8 08:17:43 playbox kernel: [43484.271833] lowmem_reserve[]: 0 0
Jun  8 08:17:43 playbox kernel: [43484.271849] Normal: 11664*4kB 11655*8kB 6879*16kB 74*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 252328kB
Jun  8 08:17:43 playbox kernel: [43484.271892] 18689 total pagecache pages
Jun  8 08:17:43 playbox kernel: [43484.271899] 0 pages in swap cache
Jun  8 08:17:43 playbox kernel: [43484.271907] Swap cache stats: add 0, delete 0, find 0/0
Jun  8 08:17:43 playbox kernel: [43484.271914] Free swap  = 0kB
Jun  8 08:17:43 playbox kernel: [43484.271920] Total swap = 0kB
Jun  8 08:17:43 playbox kernel: [43484.291611] 121856 pages of RAM
Jun  8 08:17:43 playbox kernel: [43484.291621] 63452 free pages
Jun  8 08:17:43 playbox kernel: [43484.291628] 3645 reserved pages
Jun  8 08:17:43 playbox kernel: [43484.291635] 3209 slab pages
Jun  8 08:17:43 playbox kernel: [43484.291641] 47275 pages shared
Jun  8 08:17:43 playbox kernel: [43484.291646] 0 pages swap cached
Jun  8 08:17:43 playbox kernel: [43484.291836] smsc95xx 1-1.1:1.0: eth0: kevent 2 may have been dropped
Jun  8 08:17:43 playbox kernel: [43484.312012] rtorrent: page allocation failure: order:0, mode:0x20
Jun  8 08:17:43 playbox kernel: [43484.312076] [<c0013b84>] (unwind_backtrace+0x0/0xf0) from [<c00b4330>] (warn_alloc_failed+0xd0/0x118)
Jun  8 08:17:43 playbox kernel: [43484.312108] [<c00b4330>] (warn_alloc_failed+0xd0/0x118) from [<c00b6a20>] (__alloc_pages_nodemask+0x53c/0x724)
Jun  8 08:17:43 playbox kernel: [43484.312138] [<c00b6a20>] (__alloc_pages_nodemask+0x53c/0x724) from [<c049cfec>] (__netdev_alloc_frag+0x90/0x118)
Jun  8 08:17:43 playbox kernel: [43484.312165] [<c049cfec>] (__netdev_alloc_frag+0x90/0x118) from [<c04a12c8>] (__netdev_alloc_skb+0x40/0xd0)
Jun  8 08:17:43 playbox kernel: [43484.312198] [<c04a12c8>] (__netdev_alloc_skb+0x40/0xd0) from [<c03c6308>] (rx_submit+0x1c/0x1f0)
Jun  8 08:17:43 playbox kernel: [43484.312228] [<c03c6308>] (rx_submit+0x1c/0x1f0) from [<c03cf3a4>] (usb_hcd_giveback_urb+0x60/0xf4)
Jun  8 08:17:43 playbox kernel: [43484.312265] [<c03cf3a4>] (usb_hcd_giveback_urb+0x60/0xf4) from [<c03f37a4>] (completion_tasklet_func+0x68/0x94)
Jun  8 08:17:43 playbox kernel: [43484.312298] [<c03f37a4>] (completion_tasklet_func+0x68/0x94) from [<c03fd358>] (tasklet_callback+0x10/0x14)
Jun  8 08:17:43 playbox kernel: [43484.312322] [<c03fd358>] (tasklet_callback+0x10/0x14) from [<c0029dfc>] (tasklet_hi_action+0x5c/0xa8)
Jun  8 08:17:43 playbox kernel: [43484.312356] [<c0029dfc>] (tasklet_hi_action+0x5c/0xa8) from [<c0029564>] (__do_softirq+0xb4/0x23c)
Jun  8 08:17:43 playbox kernel: [43484.312380] [<c0029564>] (__do_softirq+0xb4/0x23c) from [<c0029af4>] (irq_exit+0x88/0x94)
Jun  8 08:17:43 playbox kernel: [43484.312409] [<c0029af4>] (irq_exit+0x88/0x94) from [<c000e9e0>] (handle_IRQ+0x34/0x84)
Jun  8 08:17:44 playbox kernel: [43484.312432] [<c000e9e0>] (handle_IRQ+0x34/0x84) from [<c055f314>] (__irq_svc+0x34/0xc8)
Jun  8 08:17:44 playbox kernel: [43484.312457] [<c055f314>] (__irq_svc+0x34/0xc8) from [<c00b19f8>] (filemap_fault+0xe8/0x460)
Jun  8 08:17:44 playbox kernel: [43484.312482] [<c00b19f8>] (filemap_fault+0xe8/0x460) from [<c00ce0fc>] (__do_fault+0x6c/0x4c4)
Jun  8 08:17:44 playbox kernel: [43484.312505] [<c00ce0fc>] (__do_fault+0x6c/0x4c4) from [<c00d0d18>] (handle_pte_fault+0x74/0x7cc)
Jun  8 08:17:44 playbox kernel: [43484.312526] [<c00d0d18>] (handle_pte_fault+0x74/0x7cc) from [<c00d150c>] (handle_mm_fault+0x9c/0xd4)
Jun  8 08:17:44 playbox kernel: [43484.312550] [<c00d150c>] (handle_mm_fault+0x9c/0xd4) from [<c0560b64>] (do_page_fault+0x288/0x3e4)
Jun  8 08:17:44 playbox kernel: [43484.312573] [<c0560b64>] (do_page_fault+0x288/0x3e4) from [<c0008324>] (do_DataAbort+0x34/0x98)
Jun  8 08:17:44 playbox kernel: [43484.312592] [<c0008324>] (do_DataAbort+0x34/0x98) from [<c055f51c>] (__dabt_usr+0x3c/0x40)
Jun  8 08:17:44 playbox kernel: [43484.312603] Exception stack(0xcab51fb0 to 0xcab51ff8)
Jun  8 08:17:44 playbox kernel: [43484.312620] 1fa0:                                     0147a920 a675d000 a6d7d000 b6e07a5f
Jun  8 08:17:44 playbox kernel: [43484.312639] 1fc0: 6182acc8 a509aebd ec80564d 6e23728e 5a827999 d861a1a2 97be67fe 52edd0ba
Jun  8 08:17:44 playbox kernel: [43484.312655] 1fe0: cb3f298b b6566c9c b6566cd8 b677f9dc 20000010 ffffffff
Jun  8 08:17:44 playbox kernel: [43484.312664] Mem-info:
Jun  8 08:17:44 playbox kernel: [43484.312673] Normal per-cpu:
Jun  8 08:17:44 playbox kernel: [43484.312683] CPU    0: hi:  186, btch:  31 usd:  73
Jun  8 08:17:44 playbox kernel: [43484.312706] active_anon:25707 inactive_anon:62 isolated_anon:0
Jun  8 08:17:44 playbox kernel: [43484.312706]  active_file:6765 inactive_file:11187 isolated_file:0
Jun  8 08:17:44 playbox kernel: [43484.312706]  unevictable:1299 dirty:221 writeback:10 unstable:0
Jun  8 08:17:44 playbox kernel: [43484.312706]  free:63082 slab_reclaimable:1515 slab_unreclaimable:1694
Jun  8 08:17:44 playbox kernel: [43484.312706]  mapped:15681 shmem:119 pagetables:807 bounce:0
Jun  8 08:17:44 playbox kernel: [43484.312751] Normal free:252328kB min:16384kB low:20480kB high:24576kB active_anon:102828kB inactive_anon:248kB active_file:27060kB inactive_file:44748kB unevictable:5196kB isolated(anon):0kB isolated(file):0kB present:483488kB mlocked:5196kB dirty:884kB writeback:40kB mapped:62724kB shmem:476kB slab_reclaimable:6060kB slab_unreclaimable:6776kB kernel_stack:1032kB pagetables:3228kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:152 all_unreclaimable? no
Jun  8 08:17:44 playbox kernel: [43484.312763] lowmem_reserve[]: 0 0
Jun  8 08:17:44 playbox kernel: [43484.312780] Normal: 11664*4kB 11655*8kB 6879*16kB 74*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 252328kB
Jun  8 08:17:44 playbox kernel: [43484.312824] 18689 total pagecache pages
Jun  8 08:17:44 playbox kernel: [43484.312831] 0 pages in swap cache
Jun  8 08:17:44 playbox kernel: [43484.312839] Swap cache stats: add 0, delete 0, find 0/0
Jun  8 08:17:44 playbox kernel: [43484.312846] Free swap  = 0kB
Jun  8 08:17:44 playbox kernel: [43484.312852] Total swap = 0kB
Jun  8 08:17:44 playbox kernel: [43484.332582] 121856 pages of RAM
Jun  8 08:17:44 playbox kernel: [43484.332591] 63452 free pages
Jun  8 08:17:44 playbox kernel: [43484.332598] 3645 reserved pages
Jun  8 08:17:44 playbox kernel: [43484.332605] 3209 slab pages
Jun  8 08:17:44 playbox kernel: [43484.332611] 47275 pages shared
Jun  8 08:17:44 playbox kernel: [43484.332618] 0 pages swap cached

Any suggestions? Thanks!

Edit:

After reading this post , I managed to suppress thoses message that were caused by smsc95xx.turbo_mode=N in the cmdline.txt. But at the same time the log is full of kevent 2 may have been dropped. For now i'd rather have this because system is more responsive but it's not a solved problem.

3 Answers 3

1

According to this:

Normal: 11664*4kB 11655*8kB 6879*16kB 74*32kB 0*64kB 0*128kB 0*256kB

you have plenty of memory, but it's heavily fragmented, so any allocation attempt beyond 32kB will most definitely fail. still no idea, why your network interrupt handler requires that much.

Raspberry forum offers this temporary solution (haven't tried this myself):

The only reliable solution at this moment in time is to disable network "turbo mode" by adding "smsc95xx.turbo_mode=N" to the end of cmdline.txt in your /boot partition. This will reduce your maximum network performance very slightly but at least you won't have the allocation failures or be flooded with kevent 2 messages.

2
  • Make sense when you put it like that. I already have smsc95xx.turbo_mode=N in the cmdline.txt but that didn't change anything back then. It seem to happen a lot lot more when I raise to 150KB/S in download.
    – eephyne
    Jun 8, 2013 at 18:18
  • I've seen download speeds in excess of 1-2MB/sec (when downloading ubuntu images), haven't check logs at the time, so no idea if I had the same messages there. will do next time =)
    – lenik
    Jun 9, 2013 at 3:41
0

I also had lots of page allocation failures on my Raspberry Pi Model B (256MB RAM version). The fix I am using now is to increase the value of vm.min_free_kbytes in /etc/sysctl.conf.

vm.min_free_kbytes = 16184

I am using the Pi as an SMB file server. So it seems that networking may fragment the memory quite a bit. The changes are applied after a reboot. You can also apply them (temporarily) during runtime by running:

sudo sysctl vm.min_free_kbytes=16184

With these settings, my Pi has achieved an uptime of more than 20 days (after which I rebooted it manually).

2
  • yes , I did that too (except set to 32768 instead of 16184) and add vm.vfs_cache_pressure = 300 too , but that didn't change this behavior , this is really removing smsc95xx.turbo_mode=N who allowed me to get ride of those message :/
    – eephyne
    Jun 9, 2013 at 7:29
  • Allright, since I don't use the smsc95xx, but a WiFi nano stick, I did not need your particular fix. But I will make a mental note, that it might be necessary.
    – Arne
    Jun 9, 2013 at 9:35
0

Ran into something similar, I use arch linux and setup my pi as an NFS client. It mounts a NFS share provided by a fast I7 server:

mount pluto:/pub -o hard,intr /pub or mount pluto:/pub -o vers=3,hard,intr /pub (for NFS v3)

they both run into the trouble as described above.

Entering the "mount" command in the pi displays 1048576 bytes for the rsize and wsize (1 M), which could be too high for this device. The rsize and wsize defaults are assigned by the NFS server.

Lowering it to 4k (as an experiment) in the mount command helped, lowering it to 32k also !

mount pluto:/pub -o vers=3,hard,intr,rsize=33000,wsize=33000 /pub (for NFS v3 again).

This also seems a logical explanation for the behaviour that was observed.

Additional to this add (as explained earlier in this thread) the following to 99-sysctl.conf in /etc/sysctl.d (we run arch with systemd i.s.o. "init") :

vm.min_free_kbytes=32768

That should do the job ;-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.