public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Memory leak in the ramfs file system
  2001-03-29 23:48 ` Linus Torvalds
@ 2000-06-12 20:50   ` Jaswinder Singh
  2001-03-30  9:43     ` Jeff Garzik
  0 siblings, 1 reply; 9+ messages in thread
From: Jaswinder Singh @ 2000-06-12 20:50 UTC (permalink / raw)
  To: linux-kernel, Linus Torvalds, Jamey Hicks
  Cc: Stephen L Johnson, Jaswinder Singh

[-- Attachment #1: Type: text/plain, Size: 728 bytes --]

Dear Linus,


> What does /proc/slabinfo say? The most likely leak is a dentry leak or
> an inode leak, and both of those should be fairly easy to see in the
> slab info (dentry_cache and inode_cache respectively).
>

I am attaching details before and during  my application .

Mainly changes are in dentry_cache and inode_cache , but i am attaching
whole /proc/slabinfo for your reference.


> Obviously, it could be a data page leak too, but such a leak should be
> easy to see by creating a few big files and deleting them..
>
> Linus

I am also facing one more problem with ramfs.

du and df shows 0 , so i am also attaching its output.

Thanks for your help,

Best Regards,

Jaswinder.
--
These are my opinions not 3Di.




[-- Attachment #2: beforeapp.txt --]
[-- Type: text/plain, Size: 3885 bytes --]

Before my Application Start
---------------------------
(none):/mnt/ramfs/root# cat /proc/meminfo 
        total:    used:    free:  shared: buffers:  cached:
Mem:  31571968 18669568 12902400        0    24576 12156928
Swap:        0        0        0
MemTotal:        30832 kB
MemFree:         12600 kB
MemShared:           0 kB
Buffers:            24 kB
Cached:          11872 kB
Active:           4456 kB
Inact_dirty:       508 kB
Inact_clean:      6932 kB
Inact_target:        8 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        30832 kB
LowFree:         12600 kB
SwapTotal:           0 kB
SwapFree:            0 kB
(none):/mnt/ramfs/root# free
             total       used       free     shared    buffers     cached
Mem:         30832      18284      12548          0         24      11916
-/+ buffers/cache:       6344      24488
Swap:            0          0          0
(none):/mnt/ramfs/root# cat /proc/slabinfo 
slabinfo - version: 1.1
kmem_cache            53     78    100    2    2    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        5    113     32    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     64    0    0    1
ip_fib_hash            8    113     32    1    1    1
ip_dst_cache          11     24    160    1    1    1
arp_cache              2     30    128    1    1    1
blkdev_requests      256    280     96    7    7    1
dnotify cache          0      0     20    0    0    1
file lock cache        0     42     92    0    1    1
fasync cache           2    202     16    1    1    1
uid_cache              1    113     32    1    1    1
skbuff_head_cache     84    120    160    4    5    1
sock                  30     35    800    6    7    1
inode_cache         2218   2220    384  222  222    1
bdev_cache            48     59     64    1    1    1
sigqueue               0     29    132    0    1    1
kiobuf                 0      0    128    0    0    1
dentry_cache        2351   2370    128   79   79    1
filp                 125    160     96    4    4    1
names_cache            0      2   4096    0    2    1
buffer_head            9     40     96    1    1    1
mm_struct             13     24    160    1    1    1
vm_area_struct       268    354     64    5    6    1
fs_cache              12     59     64    1    1    1
files_cache           12     18    416    2    2    1
signal_act            14     15   1312    5    5    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             1      1  32768    1    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      0   8192    0    0    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              3      4   4096    3    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048              6      8   2048    3    4    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024              9     16   1024    3    4    1
size-512(DMA)          0      0    512    0    0    1
size-512              23     32    512    3    4    1
size-256(DMA)          0      0    256    0    0    1
size-256              20     60    256    2    4    1
size-128(DMA)          0      0    128    0    0    1
size-128             366    450    128   13   15    1
size-64(DMA)           0      0     64    0    0    1
size-64               43     59     64    1    1    1
size-32(DMA)           0      0     32    0    0    1
size-32              116    226     32    2    2    1

[-- Attachment #3: duringapp.txt --]
[-- Type: text/plain, Size: 33856 bytes --]

when my Application is running : i am able to take only 11 slabinfo details then my machine hanged
------------------------------
(none):/mnt/ramfs/root# free
             total       used       free     shared    buffers     cached
Mem:         30832      20792      10040          0         24      13992
-/+ buffers/cache:       6776      24056
Swap:            0          0          0
(none):/mnt/ramfs/root# cat /proc/slabinfo 
slabinfo - version: 1.1
kmem_cache            53     78    100    2    2    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        6    113     32    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     64    0    0    1
ip_fib_hash            8    113     32    1    1    1
ip_dst_cache           9     24    160    1    1    1
arp_cache              2     30    128    1    1    1
blkdev_requests      256    280     96    7    7    1
dnotify cache          0      0     20    0    0    1
file lock cache        0     42     92    0    1    1
fasync cache           2    202     16    1    1    1
uid_cache              1    113     32    1    1    1
skbuff_head_cache     84    120    160    4    5    1
sock                  31     35    800    7    7    1
inode_cache         3439   3440    384  344  344    1
bdev_cache            48     59     64    1    1    1
sigqueue               0     29    132    0    1    1
kiobuf                 0      0    128    0    0    1
dentry_cache        3573   3600    128  120  120    1
filp                 127    160     96    4    4    1
names_cache            0      2   4096    0    2    1
buffer_head            9     40     96    1    1    1
mm_struct             14     24    160    1    1    1
vm_area_struct       279    354     64    5    6    1
fs_cache              13     59     64    1    1    1
files_cache           13     18    416    2    2    1
signal_act            15     18   1312    5    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             1      1  32768    1    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      0   8192    0    0    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048             30     30   2048   15   15    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024              9     20   1024    3    5    1
size-512(DMA)          0      0    512    0    0    1
size-512              23     32    512    3    4    1
size-256(DMA)          0      0    256    0    0    1
size-256              20     60    256    2    4    1
size-128(DMA)          0      0    128    0    0    1
size-128             366    450    128   13   15    1
size-64(DMA)           0      0     64    0    0    1
size-64               44     59     64    1    1    1
size-32(DMA)           0      0     32    0    0    1
size-32              127    226     32    2    2    1
(none):/mnt/ramfs/root# cat /proc/slabinfo 
slabinfo - version: 1.1
kmem_cache            53     78    100    2    2    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        6    113     32    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     64    0    0    1
ip_fib_hash            8    113     32    1    1    1
ip_dst_cache           9     24    160    1    1    1
arp_cache              2     30    128    1    1    1
blkdev_requests      256    280     96    7    7    1
dnotify cache          0      0     20    0    0    1
file lock cache        0     42     92    0    1    1
fasync cache           2    202     16    1    1    1
uid_cache              1    113     32    1    1    1
skbuff_head_cache     84    120    160    4    5    1
sock                  31     35    800    7    7    1
inode_cache         3809   3810    384  381  381    1
bdev_cache            48     59     64    1    1    1
sigqueue               0     29    132    0    1    1
kiobuf                 0      0    128    0    0    1
dentry_cache        3943   3960    128  132  132    1
filp                 127    160     96    4    4    1
names_cache            0      2   4096    0    2    1
buffer_head            9     40     96    1    1    1
mm_struct             14     24    160    1    1    1
vm_area_struct       279    354     64    5    6    1
fs_cache              13     59     64    1    1    1
files_cache           13     18    416    2    2    1
signal_act            15     18   1312    5    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             1      1  32768    1    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      0   8192    0    0    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048             30     30   2048   15   15    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024              9     20   1024    3    5    1
size-512(DMA)          0      0    512    0    0    1
size-512              23     32    512    3    4    1
size-256(DMA)          0      0    256    0    0    1
size-256              20     60    256    2    4    1
size-128(DMA)          0      0    128    0    0    1
size-128             366    450    128   13   15    1
size-64(DMA)           0      0     64    0    0    1
size-64               44     59     64    1    1    1
size-32(DMA)           0      0     32    0    0    1
size-32              127    226     32    2    2    1
(none):/mnt/ramfs/root# cat /proc/slabinfo 
slabinfo - version: 1.1
kmem_cache            53     78    100    2    2    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        6    113     32    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     64    0    0    1
ip_fib_hash            8    113     32    1    1    1
ip_dst_cache           9     24    160    1    1    1
arp_cache              2     30    128    1    1    1
blkdev_requests      256    280     96    7    7    1
dnotify cache          0      0     20    0    0    1
file lock cache        0     42     92    0    1    1
fasync cache           2    202     16    1    1    1
uid_cache              1    113     32    1    1    1
skbuff_head_cache     84    120    160    4    5    1
sock                  31     35    800    7    7    1
inode_cache         4194   4200    384  420  420    1
bdev_cache            48     59     64    1    1    1
sigqueue               0     29    132    0    1    1
kiobuf                 0      0    128    0    0    1
dentry_cache        4328   4350    128  145  145    1
filp                 127    160     96    4    4    1
names_cache            0      2   4096    0    2    1
buffer_head            9     40     96    1    1    1
mm_struct             14     24    160    1    1    1
vm_area_struct       279    354     64    5    6    1
fs_cache              13     59     64    1    1    1
files_cache           13     18    416    2    2    1
signal_act            15     18   1312    5    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             1      1  32768    1    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      0   8192    0    0    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048             30     32   2048   15   16    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024              9     20   1024    3    5    1
size-512(DMA)          0      0    512    0    0    1
size-512              23     32    512    3    4    1
size-256(DMA)          0      0    256    0    0    1
size-256              20     60    256    2    4    1
size-128(DMA)          0      0    128    0    0    1
size-128             366    450    128   13   15    1
size-64(DMA)           0      0     64    0    0    1
size-64               44     59     64    1    1    1
size-32(DMA)           0      0     32    0    0    1
size-32              128    226     32    2    2    1
(none):/mnt/ramfs/root# cat /proc/slabinfo 
slabinfo - version: 1.1
kmem_cache            53     78    100    2    2    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        6    113     32    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     64    0    0    1
ip_fib_hash            8    113     32    1    1    1
ip_dst_cache           9     24    160    1    1    1
arp_cache              2     30    128    1    1    1
blkdev_requests      256    280     96    7    7    1
dnotify cache          0      0     20    0    0    1
file lock cache        0     42     92    0    1    1
fasync cache           2    202     16    1    1    1
uid_cache              1    113     32    1    1    1
skbuff_head_cache     84    120    160    4    5    1
sock                  31     35    800    7    7    1
inode_cache         4506   4510    384  451  451    1
bdev_cache            48     59     64    1    1    1
sigqueue               0     29    132    0    1    1
kiobuf                 0      0    128    0    0    1
dentry_cache        4640   4650    128  155  155    1
filp                 127    160     96    4    4    1
names_cache            0      2   4096    0    2    1
buffer_head            9     40     96    1    1    1
mm_struct             14     24    160    1    1    1
vm_area_struct       279    354     64    5    6    1
fs_cache              13     59     64    1    1    1
files_cache           13     18    416    2    2    1
signal_act            15     18   1312    5    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             1      1  32768    1    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      0   8192    0    0    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048             30     32   2048   15   16    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024              9     20   1024    3    5    1
size-512(DMA)          0      0    512    0    0    1
size-512              24     32    512    3    4    1
size-256(DMA)          0      0    256    0    0    1
size-256              20     60    256    2    4    1
size-128(DMA)          0      0    128    0    0    1
size-128             366    450    128   13   15    1
size-64(DMA)           0      0     64    0    0    1
size-64               44     59     64    1    1    1
size-32(DMA)           0      0     32    0    0    1
size-32              128    226     32    2    2    1
(none):/mnt/ramfs/root# cat /proc/slabinfo 
slabinfo - version: 1.1
kmem_cache            53     78    100    2    2    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        6    113     32    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     64    0    0    1
ip_fib_hash            8    113     32    1    1    1
ip_dst_cache           9     24    160    1    1    1
arp_cache              2     30    128    1    1    1
blkdev_requests      256    280     96    7    7    1
dnotify cache          0      0     20    0    0    1
file lock cache        0     42     92    0    1    1
fasync cache           2    202     16    1    1    1
uid_cache              1    113     32    1    1    1
skbuff_head_cache     84    120    160    4    5    1
sock                  31     35    800    7    7    1
inode_cache         4896   4900    384  490  490    1
bdev_cache            48     59     64    1    1    1
sigqueue               0     29    132    0    1    1
kiobuf                 0      0    128    0    0    1
dentry_cache        5030   5040    128  168  168    1
filp                 127    160     96    4    4    1
names_cache            0      2   4096    0    2    1
buffer_head            9     40     96    1    1    1
mm_struct             14     24    160    1    1    1
vm_area_struct       279    354     64    5    6    1
fs_cache              13     59     64    1    1    1
files_cache           13     18    416    2    2    1
signal_act            15     18   1312    5    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             1      1  32768    1    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      0   8192    0    0    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048             30     32   2048   15   16    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024              9     20   1024    3    5    1
size-512(DMA)          0      0    512    0    0    1
size-512              23     32    512    3    4    1
size-256(DMA)          0      0    256    0    0    1
size-256              20     60    256    2    4    1
size-128(DMA)          0      0    128    0    0    1
size-128             366    450    128   13   15    1
size-64(DMA)           0      0     64    0    0    1
size-64               44     59     64    1    1    1
size-32(DMA)           0      0     32    0    0    1
size-32              128    226     32    2    2    1
(none):/mnt/ramfs/root# cat /proc/slabinfo 
slabinfo - version: 1.1
kmem_cache            53     78    100    2    2    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        6    113     32    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     64    0    0    1
ip_fib_hash            8    113     32    1    1    1
ip_dst_cache           9     24    160    1    1    1
arp_cache              2     30    128    1    1    1
blkdev_requests      256    280     96    7    7    1
dnotify cache          0      0     20    0    0    1
file lock cache        0     42     92    0    1    1
fasync cache           2    202     16    1    1    1
uid_cache              1    113     32    1    1    1
skbuff_head_cache     84    120    160    4    5    1
sock                  31     35    800    7    7    1
inode_cache         5306   5310    384  531  531    1
bdev_cache            48     59     64    1    1    1
sigqueue               0     29    132    0    1    1
kiobuf                 0      0    128    0    0    1
dentry_cache        5440   5460    128  182  182    1
filp                 127    160     96    4    4    1
names_cache            0      2   4096    0    2    1
buffer_head            9     40     96    1    1    1
mm_struct             14     24    160    1    1    1
vm_area_struct       279    354     64    5    6    1
fs_cache              13     59     64    1    1    1
files_cache           13     18    416    2    2    1
signal_act            15     18   1312    5    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             1      1  32768    1    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      0   8192    0    0    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048             30     32   2048   15   16    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024              9     20   1024    3    5    1
size-512(DMA)          0      0    512    0    0    1
size-512              23     32    512    3    4    1
size-256(DMA)          0      0    256    0    0    1
size-256              20     60    256    2    4    1
size-128(DMA)          0      0    128    0    0    1
size-128             366    450    128   13   15    1
size-64(DMA)           0      0     64    0    0    1
size-64               44     59     64    1    1    1
size-32(DMA)           0      0     32    0    0    1
size-32              128    226     32    2    2    1
(none):/mnt/ramfs/root# cat /proc/slabinfo 
slabinfo - version: 1.1
kmem_cache            53     78    100    2    2    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        6    113     32    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     64    0    0    1
ip_fib_hash            8    113     32    1    1    1
ip_dst_cache           9     24    160    1    1    1
arp_cache              2     30    128    1    1    1
blkdev_requests      256    280     96    7    7    1
dnotify cache          0      0     20    0    0    1
file lock cache        0     42     92    0    1    1
fasync cache           2    202     16    1    1    1
uid_cache              1    113     32    1    1    1
skbuff_head_cache     84    120    160    4    5    1
sock                  31     35    800    7    7    1
inode_cache         5702   5710    384  571  571    1
bdev_cache            48     59     64    1    1    1
sigqueue               0     29    132    0    1    1
kiobuf                 0      0    128    0    0    1
dentry_cache        5836   5850    128  195  195    1
filp                 127    160     96    4    4    1
names_cache            0      2   4096    0    2    1
buffer_head            9     40     96    1    1    1
mm_struct             14     24    160    1    1    1
vm_area_struct       279    354     64    5    6    1
fs_cache              13     59     64    1    1    1
files_cache           13     18    416    2    2    1
signal_act            15     18   1312    5    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             1      1  32768    1    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      0   8192    0    0    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048             30     32   2048   16   16    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024              9     20   1024    3    5    1
size-512(DMA)          0      0    512    0    0    1
size-512              23     32    512    3    4    1
size-256(DMA)          0      0    256    0    0    1
size-256              20     60    256    2    4    1
size-128(DMA)          0      0    128    0    0    1
size-128             366    450    128   13   15    1
size-64(DMA)           0      0     64    0    0    1
size-64               44     59     64    1    1    1
size-32(DMA)           0      0     32    0    0    1
size-32              128    226     32    2    2    1
(none):/mnt/ramfs/root# cat /proc/slabinfo 
slabinfo - version: 1.1
kmem_cache            53     78    100    2    2    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        6    113     32    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     64    0    0    1
ip_fib_hash            8    113     32    1    1    1
ip_dst_cache           9     24    160    1    1    1
arp_cache              2     30    128    1    1    1
blkdev_requests      256    280     96    7    7    1
dnotify cache          0      0     20    0    0    1
file lock cache        0     42     92    0    1    1
fasync cache           2    202     16    1    1    1
uid_cache              1    113     32    1    1    1
skbuff_head_cache     84    120    160    4    5    1
sock                  31     35    800    7    7    1
inode_cache         4994   5780    384  578  578    1
bdev_cache            48     59     64    1    1    1
sigqueue               0     29    132    0    1    1
kiobuf                 0      0    128    0    0    1
dentry_cache        4893   5820    128  194  194    1
filp                 127    160     96    4    4    1
names_cache            0      2   4096    0    2    1
buffer_head           13     40     96    1    1    1
mm_struct             14     24    160    1    1    1
vm_area_struct       279    354     64    5    6    1
fs_cache              13     59     64    1    1    1
files_cache           13     18    416    2    2    1
signal_act            15     18   1312    5    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             1      1  32768    1    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      0   8192    0    0    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048             30     32   2048   15   16    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024              9     20   1024    3    5    1
size-512(DMA)          0      0    512    0    0    1
size-512              23     32    512    3    4    1
size-256(DMA)          0      0    256    0    0    1
size-256              20     60    256    2    4    1
size-128(DMA)          0      0    128    0    0    1
size-128             366    450    128   13   15    1
size-64(DMA)           0      0     64    0    0    1
size-64               44     59     64    1    1    1
size-32(DMA)           0      0     32    0    0    1
size-32              113    226     32    2    2    1
(none):/mnt/ramfs/root# cat /proc/slabinfo 
slabinfo - version: 1.1
kmem_cache            53     78    100    2    2    1
tcp_tw_bucket          0     40     96    0    1    1
tcp_bind_bucket        6    113     32    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     64    0    0    1
ip_fib_hash            8    113     32    1    1    1
ip_dst_cache           9     24    160    1    1    1
arp_cache              2     30    128    1    1    1
blkdev_requests      256    280     96    7    7    1
dnotify cache          0      0     20    0    0    1
file lock cache        0     42     92    0    1    1
fasync cache           2    202     16    1    1    1
uid_cache              1    113     32    1    1    1
skbuff_head_cache     84    120    160    4    5    1
sock                  31     35    800    7    7    1
inode_cache         5268   5780    384  578  578    1
bdev_cache            48     59     64    1    1    1
sigqueue               0     29    132    0    1    1
kiobuf                 0      0    128    0    0    1
dentry_cache        5266   5820    128  194  194    1
filp                 127    160     96    4    4    1
names_cache            0      2   4096    0    2    1
buffer_head           13     40     96    1    1    1
mm_struct             14     24    160    1    1    1
vm_area_struct       279    354     64    5    6    1
fs_cache              13     59     64    1    1    1
files_cache           13     18    416    2    2    1
signal_act            15     18   1312    5    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             1      1  32768    1    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      0   8192    0    0    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048             30     32   2048   15   16    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024              9     20   1024    3    5    1
size-512(DMA)          0      0    512    0    0    1
size-512              23     32    512    3    4    1
size-256(DMA)          0      0    256    0    0    1
size-256              20     60    256    2    4    1
size-128(DMA)          0      0    128    0    0    1
size-128             366    450    128   13   15    1
size-64(DMA)           0      0     64    0    0    1
size-64               44     59     64    1    1    1
size-32(DMA)           0      0     32    0    0    1
size-32              113    226     32    2    2    1
(none):/mnt/ramfs/root# cat /proc/slabinfo 
slabinfo - version: 1.1
kmem_cache            53     78    100    2    2    1
tcp_tw_bucket          0      0     96    0    0    1
tcp_bind_bucket        6    113     32    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     64    0    0    1
ip_fib_hash            8    113     32    1    1    1
ip_dst_cache           9     24    160    1    1    1
arp_cache              2     30    128    1    1    1
blkdev_requests      256    280     96    7    7    1
dnotify cache          0      0     20    0    0    1
file lock cache        0      0     92    0    0    1
fasync cache           2    202     16    1    1    1
uid_cache              1    113     32    1    1    1
skbuff_head_cache     84    120    160    4    5    1
sock                  31     35    800    7    7    1
inode_cache         5624   5780    384  578  578    1
bdev_cache            48     59     64    1    1    1
sigqueue               0     29    132    0    1    1
kiobuf                 0      0    128    0    0    1
dentry_cache        5618   5820    128  194  194    1
filp                 127    160     96    4    4    1
names_cache            0      2   4096    0    2    1
buffer_head           17     40     96    1    1    1
mm_struct             14     24    160    1    1    1
vm_area_struct       279    354     64    5    6    1
fs_cache              13     59     64    1    1    1
files_cache           13     18    416    2    2    1
signal_act            15     18   1312    5    6    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             1      1  32768    1    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      0   8192    0    0    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048             30     32   2048   15   16    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024              9     20   1024    3    5    1
size-512(DMA)          0      0    512    0    0    1
size-512              23     32    512    3    4    1
size-256(DMA)          0      0    256    0    0    1
size-256              20     60    256    2    4    1
size-128(DMA)          0      0    128    0    0    1
size-128             366    450    128   13   15    1
size-64(DMA)           0      0     64    0    0    1
size-64               44     59     64    1    1    1
size-32(DMA)           0      0     32    0    0    1
size-32              113    226     32    2    2    1
(none):/mnt/ramfs/root# cat /proc/slabinfo 
slabinfo - version: 1.1
kmem_cache            53     78    100    2    2    1
tcp_tw_bucket          0      0     96    0    0    1
tcp_bind_bucket        6    113     32    1    1    1
tcp_open_request       0     59     64    0    1    1
inet_peer_cache        0      0     64    0    0    1
ip_fib_hash            8    113     32    1    1    1
ip_dst_cache           9     24    160    1    1    1
arp_cache              2     30    128    1    1    1
blkdev_requests      256    280     96    7    7    1
dnotify cache          0      0     20    0    0    1
file lock cache        0      0     92    0    0    1
fasync cache           2    202     16    1    1    1
uid_cache              1    113     32    1    1    1
skbuff_head_cache     84    120    160    4    5    1
sock                  31     35    800    7    7    1
inode_cache         5727   5780    384  578  578    1
bdev_cache            48     59     64    1    1    1
sigqueue               0     29    132    0    1    1
kiobuf                 0      0    128    0    0    1
dentry_cache        5721   5820    128  194  194    1
filp                 127    160     96    4    4    1
names_cache            0      2   4096    0    2    1
buffer_head           21     40     96    1    1    1
mm_struct             14     24    160    1    1    1
vm_area_struct       279    354     64    5    6    1
fs_cache              13     59     64    1    1    1
files_cache           13     18    416    2    2    1
signal_act            15     15   1312    5    5    1
size-131072(DMA)       0      0 131072    0    0   32
size-131072            0      0 131072    0    0   32
size-65536(DMA)        0      0  65536    0    0   16
size-65536             0      0  65536    0    0   16
size-32768(DMA)        0      0  32768    0    0    8
size-32768             1      1  32768    1    1    8
size-16384(DMA)        0      0  16384    0    0    4
size-16384             0      0  16384    0    0    4
size-8192(DMA)         0      0   8192    0    0    2
size-8192              0      0   8192    0    0    2
size-4096(DMA)         0      0   4096    0    0    1
size-4096              4      4   4096    4    4    1
size-2048(DMA)         0      0   2048    0    0    1
size-2048             30     32   2048   15   16    1
size-1024(DMA)         0      0   1024    0    0    1
size-1024              9     20   1024    3    5    1
size-512(DMA)          0      0    512    0    0    1
size-512              23     32    512    3    4    1
size-256(DMA)          0      0    256    0    0    1
size-256              20     60    256    2    4    1
size-128(DMA)          0      0    128    0    0    1
size-128             366    450    128   13   15    1
size-64(DMA)           0      0     64    0    0    1
size-64               44     59     64    1    1    1
size-32(DMA)           0      0     32    0    0    1
size-32              113    226     32    2    2    1

Linux hanged here 

[-- Attachment #4: dfdu.txt --]
[-- Type: text/plain, Size: 1438 bytes --]

(none):/mnt/ramfs/root# df -h /mnt/ramfs/
Filesystem            Size  Used Avail Use% Mounted on
ramfs                    0     0     0   -  /mnt/ramfs
(none):/mnt/ramfs/root# du /mnt/ramfs/
0       /mnt/ramfs/var/modules
0       /mnt/ramfs/var/run
0       /mnt/ramfs/var/local
0       /mnt/ramfs/var/lock
0       /mnt/ramfs/var/tmp
0       /mnt/ramfs/var/log
0       /mnt/ramfs/var
0       /mnt/ramfs/tmp/.X11-unix
0       /mnt/ramfs/tmp
0       /mnt/ramfs/root/.classifiers
0       /mnt/ramfs/root
0       /mnt/ramfs/home/guest
0       /mnt/ramfs/home/ppp
0       /mnt/ramfs/home
0       /mnt/ramfs/etc/pcmcia/cis
0       /mnt/ramfs/etc/pcmcia
0       /mnt/ramfs/etc/wlan
0       /mnt/ramfs/etc/rc2.d
0       /mnt/ramfs/etc/cron.daily
0       /mnt/ramfs/etc/rc6.d
0       /mnt/ramfs/etc/alternatives
0       /mnt/ramfs/etc/modutils/arch
0       /mnt/ramfs/etc/modutils
0       /mnt/ramfs/etc/sysconfig
0       /mnt/ramfs/etc/rc.boot
0       /mnt/ramfs/etc/rc5.d
0       /mnt/ramfs/etc/irda
0       /mnt/ramfs/etc/rc0.d
0       /mnt/ramfs/etc/cron.d
0       /mnt/ramfs/etc/rcS.d
0       /mnt/ramfs/etc/rc4.d
0       /mnt/ramfs/etc/rc1.d
0       /mnt/ramfs/etc/apt
0       /mnt/ramfs/etc/skel
0       /mnt/ramfs/etc/default
0       /mnt/ramfs/etc/init.d
0       /mnt/ramfs/etc/rc3.d
0       /mnt/ramfs/etc/rc.d/init.d
0       /mnt/ramfs/etc/rc.d
0       /mnt/ramfs/etc/ppp
0       /mnt/ramfs/etc
0       /mnt/ramfs
(none):/mnt/ramfs/root#

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Memory leak in the ramfs file system
@ 2001-03-29 22:06 Stephen L Johnson
  2001-03-29 23:48 ` Linus Torvalds
  0 siblings, 1 reply; 9+ messages in thread
From: Stephen L Johnson @ 2001-03-29 22:06 UTC (permalink / raw)
  To: linux-kernel

A group of us from the handhelds.org site think that we have found a memory 
leak in the ramfs file system. After a long period of create and deleting 
small files in a mounted ramfs partition we have substantially less freemem.  
The problem has been confirmed on 2.4.2 on an i386 and StormARM ports.

The problem was found by a developer running an application on an iPAQ that 
quickly writes a 4K file to the ramfs, does some editing of the file and it 
then deleted. The application will quickly eat up all free memory and cause 
the platform to fail within 5 minutes.

Test case: from a shell, run this short script for a long period of time (over 
1 hour):

   i=0 ; while : ; do echo 1 >$i ; rm $i ; i=`expr $i + 1` ; done

This test was run  on an Compaq iPAQ 3650 using the 2.4.2-rmk1-np3 kernel from 
the CVS repository on cvs.handhelds.org.

The following two data points are the output from /proc/meminfo.  The first  
'cat' was done about 1 minute after the loop has been running. The second 
'cat' was done 10 minutes after the script loop had been killed.

# cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  31686656 21446656 10240000        0        0 11264000
Swap:        0        0        0
MemTotal:        30944 kB
MemFree:         10000 kB
MemShared:           0 kB
Buffers:             0 kB
Cached:          11000 kB
Active:           4656 kB
Inact_dirty:      4220 kB
Inact_clean:      2124 kB
Inact_target:        0 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        30944 kB
LowFree:         10000 kB
SwapTotal:           0 kB
SwapFree:            0 kB

# cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  31686656 24178688  7507968        0        0 12357632
Swap:        0        0        0
MemTotal:        30944 kB
MemFree:          7332 kB
MemShared:           0 kB
Buffers:             0 kB
Cached:          12068 kB
Active:           4560 kB
Inact_dirty:      5384 kB
Inact_clean:      2124 kB
Inact_target:       16 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        30944 kB
LowFree:          7332 kB
SwapTotal:           0 kB
SwapFree:            0 kB

--
Stephen L Johnson  <sjohnson@monsters.org>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Memory leak in the ramfs file system
  2001-03-29 22:06 Memory leak in the ramfs file system Stephen L Johnson
@ 2001-03-29 23:48 ` Linus Torvalds
  2000-06-12 20:50   ` Jaswinder Singh
  0 siblings, 1 reply; 9+ messages in thread
From: Linus Torvalds @ 2001-03-29 23:48 UTC (permalink / raw)
  To: linux-kernel

In article <200103292206.f2TM6sJ10808@zero.monsters.org>,
Stephen L Johnson  <sjohnson@monsters.org> wrote:
>
>A group of us from the handhelds.org site think that we have found a memory 
>leak in the ramfs file system. After a long period of create and deleting 
>small files in a mounted ramfs partition we have substantially less freemem.  
>The problem has been confirmed on 2.4.2 on an i386 and StormARM ports.

What does /proc/slabinfo say? The most likely leak is a dentry leak or
an inode leak, and both of those should be fairly easy to see in the
slab info (dentry_cache and inode_cache respectively).

Obviously, it could be a data page leak too, but such a leak should be
easy to see by creating a few big files and deleting them..

		Linus

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Memory leak in the ramfs file system
  2001-03-13  1:03 Fw: " Jaswinder Singh
@ 2001-03-30  1:39 ` Jaswinder Singh
  0 siblings, 0 replies; 9+ messages in thread
From: Jaswinder Singh @ 2001-03-30  1:39 UTC (permalink / raw)
  To: Jaswinder Singh, Linus Torvalds, Jamey Hicks, linux-kernel
  Cc: Stephen L Johnson

There is some problem in my computer's clock . please do not mind .

I am sorry for inconvenience.

Jaswinder.

----- Original Message -----
From: "Jaswinder Singh" <jaswinder.singh@3disystems.com>
To: "Linus Torvalds" <torvalds@transmeta.com>; "Jamey Hicks"
<jamey@crl.dec.com>; <linux-kernel@vger.kernel.org>
Cc: "Stephen L Johnson" <sjohnson@monsters.org>; "Jaswinder Singh"
<jaswinder.singh@3disystems.com>
Sent: Monday, March 12, 2001 5:03 PM
Subject: Fw: Memory leak in the ramfs file system


> I am sorry, i am sending this mail again because earlier my Computer's
time
> was not set properly.
>
> Jaswinder
>
> ----- Original Message -----
> From: "Jaswinder Singh" <jaswinder.singh@3disystems.com>
> To: <linux-kernel@vger.kernel.org>; "Linus Torvalds"
> <torvalds@transmeta.com>; "Jamey Hicks" <jamey@crl.dec.com>
> Cc: "Stephen L Johnson" <sjohnson@monsters.org>; "Jaswinder Singh"
> <jaswinder.singh@3disystems.com>
> Sent: Monday, June 12, 2000 12:50 PM
> Subject: Re: Memory leak in the ramfs file system
>
>
> > Dear Linus,
> >
> >
> > > What does /proc/slabinfo say? The most likely leak is a dentry leak or
> > > an inode leak, and both of those should be fairly easy to see in the
> > > slab info (dentry_cache and inode_cache respectively).
> > >
> >
> > I am attaching details before and during  my application .
> >
> > Mainly changes are in dentry_cache and inode_cache , but i am attaching
> > whole /proc/slabinfo for your reference.
> >
> >
> > > Obviously, it could be a data page leak too, but such a leak should be
> > > easy to see by creating a few big files and deleting them..
> > >
> > > Linus
> >
> > I am also facing one more problem with ramfs.
> >
> > du and df shows 0 , so i am also attaching its output.
> >
> > Thanks for your help,
> >
> > Best Regards,
> >
> > Jaswinder.
> > --
> > These are my opinions not 3Di.
> >
> >
> >
> >
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Memory leak in the ramfs file system
@ 2001-03-30  3:10 Amit D Chaudhary
  2001-03-30  9:45 ` Jeff Garzik
  0 siblings, 1 reply; 9+ messages in thread
From: Amit D Chaudhary @ 2001-03-30  3:10 UTC (permalink / raw)
  To: linux-kernel

 >(none):/mnt/ramfs/root# df -h /mnt/ramfs/
 >Filesystem            Size  Used Avail Use% Mounted on
 >ramfs                    0     0     0   -  /mnt/ramfs
I am not sure, how related this is, but we have / on ramfs and using rpm 
to install(-iUvh) fails with the mesages, need 12K on /


Amit


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Memory leak in the ramfs file system
  2000-06-12 20:50   ` Jaswinder Singh
@ 2001-03-30  9:43     ` Jeff Garzik
  0 siblings, 0 replies; 9+ messages in thread
From: Jeff Garzik @ 2001-03-30  9:43 UTC (permalink / raw)
  To: Jaswinder Singh
  Cc: linux-kernel, Linus Torvalds, Jamey Hicks, Stephen L Johnson

On Mon, 12 Jun 2000, Jaswinder Singh wrote:
> > What does /proc/slabinfo say? The most likely leak is a dentry leak or
> > an inode leak, and both of those should be fairly easy to see in the
> > slab info (dentry_cache and inode_cache respectively).
> >
> 
> I am attaching details before and during  my application .
> 
> Mainly changes are in dentry_cache and inode_cache , but i am attaching
> whole /proc/slabinfo for your reference.

Would it be possible for you to attached a 'before' picture of slabinfo,
as well as 'after'?

> > Obviously, it could be a data page leak too, but such a leak should be
> > easy to see by creating a few big files and deleting them..
> >
> > Linus
> 
> I am also facing one more problem with ramfs.
> 
> du and df shows 0 , so i am also attaching its output.

I don't recall how du works exactly... if it uses stat(2), it should not
be broken AFAIK.

As for 'df', that will definitely show zero, because ramfs does not do
filesystem accounting in its present form.  You might consider trying a
modified version of ramfs, as found in Alan Cox's 'ac' patchkit.  This
patchkit includes a modified ramfs which supports limiting filesystem
size, but more importantly (for you), it should make 'df' work again.

	Jeff





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Memory leak in the ramfs file system
  2001-03-30  3:10 Amit D Chaudhary
@ 2001-03-30  9:45 ` Jeff Garzik
  2001-03-30 17:29   ` Amit D Chaudhary
  0 siblings, 1 reply; 9+ messages in thread
From: Jeff Garzik @ 2001-03-30  9:45 UTC (permalink / raw)
  To: Amit D Chaudhary; +Cc: linux-kernel

On Thu, 29 Mar 2001, Amit D Chaudhary wrote:
>  >(none):/mnt/ramfs/root# df -h /mnt/ramfs/
>  >Filesystem            Size  Used Avail Use% Mounted on
>  >ramfs                    0     0     0   -  /mnt/ramfs
> I am not sure, how related this is, but we have / on ramfs and using rpm 
> to install(-iUvh) fails with the mesages, need 12K on /

This is normal -- ramfs doesn't do filesystem accounting needed for 'df'.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Memory leak in the ramfs file system
  2001-03-30  9:45 ` Jeff Garzik
@ 2001-03-30 17:29   ` Amit D Chaudhary
  0 siblings, 0 replies; 9+ messages in thread
From: Amit D Chaudhary @ 2001-03-30 17:29 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-kernel

Hi,

Thanks for the reply.

So the question next would be whether ramfs will include features to make it 
viable or stay with less features with the aim of keeping it simple.

Today, plan to check the 2-4.2-ac2x series to see if they fix this.

Regards
Amit

Jeff Garzik wrote:

> On Thu, 29 Mar 2001, Amit D Chaudhary wrote:
> 
>>  >(none):/mnt/ramfs/root# df -h /mnt/ramfs/
>>  >Filesystem            Size  Used Avail Use% Mounted on
>>  >ramfs                    0     0     0   -  /mnt/ramfs
>> I am not sure, how related this is, but we have / on ramfs and using rpm 
>> to install(-iUvh) fails with the mesages, need 12K on /
> 
> 
> This is normal -- ramfs doesn't do filesystem accounting needed for 'df'.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Memory leak in the ramfs file system
@ 2001-03-30 19:43 Amit D Chaudhary
  0 siblings, 0 replies; 9+ messages in thread
From: Amit D Chaudhary @ 2001-03-30 19:43 UTC (permalink / raw)
  To: linux-kernel

Hi,

After testing with patch-2.4.2-ac28, the df commands works fine on a dir 
mounted as ramfs. Also, it recognizes the limits set, etc.

Thanks to David Gibson, Alan and others for making this available.

Regards
Amit


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-03-30 19:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-29 22:06 Memory leak in the ramfs file system Stephen L Johnson
2001-03-29 23:48 ` Linus Torvalds
2000-06-12 20:50   ` Jaswinder Singh
2001-03-30  9:43     ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2001-03-30 19:43 Amit D Chaudhary
2001-03-30  3:10 Amit D Chaudhary
2001-03-30  9:45 ` Jeff Garzik
2001-03-30 17:29   ` Amit D Chaudhary
2001-03-13  1:03 Fw: " Jaswinder Singh
2001-03-30  1:39 ` Jaswinder Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox