This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

kernel 2.6.37 heavy memory consumption causes errors

Other Parts Discussed in Thread: OMAP3530

 

Hello!

 

I'm working on OMAP3530 based project.

We are now porting from kernel 2.6.29 (based on OMAP35x-PSP-SDK-02.01.03.11), to 2.6.37 (based on AM35x-OMAP35x-LINUX-PSP-04.02.00.07).

When doing untar to a large file (90MB) on the MMC, my system's free memory drops gradually, until it goes lower than 1873  (I assume, since this is the value of /proc/sys/vm/min_free_kbytes, I don't get the chance to check exactly...), I get the output attache below. It also happens when I do the same action on my NAND flash (mounted with jffs2 filesystem)

The problem did not occur in the previous kernel, so I think this is either a configuration problem or a bug...

Can anyone help me with this?

 

Thanks,

Tamar

 

root@omap3evm:/media/mmcblk0p1# tar -xzf large_file.tar.gz -C my_folder &

root@omap3evm:/media/mmcblk0p1# cat /proc/meminfo

MemTotal:         206464 kB

MemFree:            2876 kB

Buffers:            1608 kB

Cached:           157012 kB

SwapCached:            0 kB

Active:             8144 kB

Inactive:         151488 kB

Active(anon):       1108 kB

Inactive(anon):        4 kB

Active(file):       7036 kB

Inactive(file):   151484 kB

Unevictable:           0 kB

Mlocked:               0 kB

SwapTotal:             0 kB

SwapFree:              0 kB

Dirty:             12788 kB

Writeback:          3140 kB

AnonPages:          1044 kB

Mapped:             1008 kB

Shmem:                96 kB

Slab:              16584 kB

SReclaimable:       9672 kB

SUnreclaim:         6912 kB

KernelStack:         424 kB

PageTables:          124 kB

NFS_Unstable:          0 kB

Bounce:                0 kB

WritebackTmp:          0 kB

CommitLimit:      103232 kB

Committed_AS:       3344 kB

VmallocTotal:     688128 kB

VmallocUsed:        1972 kB

VmallocChunk:     685948 kB

root@omap3evm:/media/mmcblk0p1# [  936.044433]

[  936.044464] =================================

[  936.050567] [ INFO: inconsistent lock state ]

[  936.055145] 2.6.37 #249

[  936.057708] ---------------------------------

[  936.062286] inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage.

[  936.069152] kswapd0/414 [HC0[0]:SC0[0]:HE1:SE1] takes:

[  936.074523]  (&f->sem){+.+.?.}, at: [<c018bfec>] jffs2_do_clear_inode+0x18/0x104

[  936.082336] {RECLAIM_FS-ON-W} state was registered at:

[  936.087738]   [<c008e6ac>] mark_held_locks+0x60/0x84

[  936.092956]   [<c008e78c>] lockdep_trace_alloc+0xbc/0xec

[  936.098541]   [<c00d3ed0>] __kmalloc+0x50/0x108

[  936.103302]   [<c018c5b0>] jffs2_do_read_inode_internal+0x38/0x1ac4

[  936.109893]   [<c018e2bc>] jffs2_do_read_inode+0x1ec/0x20c

[  936.115661]   [<c0194514>] jffs2_iget+0x70/0x324

[  936.120513]   [<c0194a60>] jffs2_do_fill_super+0x168/0x230

[  936.126281]   [<c025c0e4>] mount_mtd_aux+0x4c/0xe0

[  936.131347]   [<c025c300>] mount_mtd+0x138/0x168

[  936.136199]   [<c019546c>] jffs2_mount+0x10/0x18

[  936.141052]   [<c00d8934>] vfs_kern_mount+0xa0/0x1c8

[  936.146270]   [<c00d8aa0>] do_kern_mount+0x34/0xd8

[  936.151306]   [<c00eeaf8>] do_mount+0x688/0x6e8

[  936.156066]   [<c00eebdc>] sys_mount+0x84/0xc4

[  936.160736]   [<c0008dc4>] do_mount_root+0x1c/0xb0

[  936.165771]   [<c000903c>] mount_block_root+0xf8/0x210

[  936.171173]   [<c00091f4>] mount_root+0xa0/0xbc

[  936.175933]   [<c0009368>] prepare_namespace+0x158/0x1b0

[  936.181518]   [<c0008708>] kernel_init+0x10c/0x14c

[  936.186553]   [<c003d790>] kernel_thread_exit+0x0/0x8

[  936.191894] irq event stamp: 359626

[  936.195556] hardirqs last  enabled at (359626): [<c00b3340>] free_hot_cold_page+0x19c/0x1b0

[  936.204315] hardirqs last disabled at (359625): [<c00b31f4>] free_hot_cold_page+0x50/0x1b0

[  936.213012] softirqs last  enabled at (358537): [<c006bdf0>] irq_exit+0x50/0x9c

[  936.220703] softirqs last disabled at (358526): [<c006bdf0>] irq_exit+0x50/0x9c

[  936.228363]

[  936.228393] other info that might help us debug this:

[  936.235229] 2 locks held by kswapd0/414:

[  936.239349]  #0:  (shrinker_rwsem){++++..}, at: [<c00b9864>] shrink_slab+0x24/0x180

[  936.247406]  #1:  (iprune_sem){++++.-}, at: [<c00ea414>] shrink_icache_memory+0x30/0x2ac

[  936.255950]

[  936.255950] stack backtrace:

[  936.260559] [<c00424d8>] (unwind_backtrace+0x0/0xec) from [<c008dfe0>] (print_usage_bug+0x170/0x1b4)

[  936.270141] [<c008dfe0>] (print_usage_bug+0x170/0x1b4) from [<c008e380>] (mark_lock+0x35c/0x628)

[  936.279388] [<c008e380>] (mark_lock+0x35c/0x628) from [<c008fd6c>] (__lock_acquire+0x734/0x17f0)

[  936.288604] [<c008fd6c>] (__lock_acquire+0x734/0x17f0) from [<c0090e88>] (lock_acquire+0x60/0x74)

[  936.297943] [<c0090e88>] (lock_acquire+0x60/0x74) from [<c04036d4>] (mutex_lock_nested+0x60/0x2e4)

[  936.307342] [<c04036d4>] (mutex_lock_nested+0x60/0x2e4) from [<c018bfec>] (jffs2_do_clear_inode+0x18/0x104)

[  936.317596] [<c018bfec>] (jffs2_do_clear_inode+0x18/0x104) from [<c00e9864>] (evict+0x20/0x94)

[  936.326629] [<c00e9864>] (evict+0x20/0x94) from [<c00e9f24>] (dispose_list+0x28/0x88)

[  936.334869] [<c00e9f24>] (dispose_list+0x28/0x88) from [<c00ea64c>] (shrink_icache_memory+0x268/0x2ac)

[  936.344665] [<c00ea64c>] (shrink_icache_memory+0x268/0x2ac) from [<c00b991c>] (shrink_slab+0xdc/0x180)

[  936.354431] [<c00b991c>] (shrink_slab+0xdc/0x180) from [<c00b9da0>] (kswapd+0x3e0/0x59c)

[  936.362945] [<c00b9da0>] (kswapd+0x3e0/0x59c) from [<c007d944>] (kthread+0x84/0x8c)

[  936.371002] [<c007d944>] (kthread+0x84/0x8c) from [<c003d790>] (kernel_thread_exit+0x0/0x8)