[#3877] echo 0 > /proc/sys/vm/pagecache_ratio may hang shell

Document created by Aaronwu Employee on Aug 28, 2013
Version 1Show Document
  • View in full screen mode

[#3877] echo 0 > /proc/sys/vm/pagecache_ratio may hang shell

Submitted By: Yi Li

Open Date

2008-01-31 21:23:23     Close Date

2008-03-17 18:47:23

Priority:

Very Low     Assignee:

Nobody

Status:

Closed     Fixed In Release:

N/A

Found In Release:

N/A     Release:

svn trunk

Category:

N/A     Board:

STAMP

Processor:

BF537     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

svn trunk

App binary format:

N/A     

Summary: echo 0 > /proc/sys/vm/pagecache_ratio may hang shell

Details:

 

Just log here - not sure this is expected behavior or bug.

 

When using jffs2 in NOR flash as rootfs, doing bellow operation will hang the shell.

 

root:/> mount                                                                                              

rootfs on / type rootfs (rw)                                                                               

/dev/root on / type jffs2 (rw)                                                                             

proc on /proc type proc (rw)                                                                               

ramfs on /var type ramfs (rw)                                                                              

sysfs on /sys type sysfs (rw) 

 

root:/> echo 50 > /proc/sys/vm/pagecache_ratio                                                             

root:/> echo 3 > /proc/sys/vm/drop_caches                                                                  

root:/> cat /proc/meminfo                                                                                  

MemTotal:        55324 kB                                                                                  

MemFree:         51248 kB                                                                                  

Buffers:             0 kB                                                                                  

Cached:            148 kB                                                                                  

SwapCached:          0 kB                                                                                  

Active:             36 kB                                                                                  

Inactive:          112 kB                                                                                  

SwapTotal:           0 kB                                                                                  

SwapFree:            0 kB                                                                                  

Dirty:               0 kB                                                                                  

Writeback:           0 kB                                                                                  

AnonPages:           0 kB                                                                                  

Mapped:              0 kB                                                                                  

Slab:             1180 kB                                                                                  

SReclaimable:      160 kB                                                                                  

SUnreclaim:       1020 kB                                                                                  

PageTables:          0 kB                                                                                  

NFS_Unstable:        0 kB                                                                                  

Bounce:              0 kB                                                                                  

CommitLimit:     27660 kB                                                                                  

Committed_AS:        0 kB                                                                                  

VmallocTotal:        0 kB                                                                                  

VmallocUsed:         0 kB                                                                                  

VmallocChunk:        0 kB                                                                                  

root:/> echo 0 > /proc/sys/vm/pagecache_ratio                                                              

root:/> echo 3 > /proc/sys/vm/drop_caches                                                                  

root:/> cat /proc/meminfo

 

[shell hangs here, it is responsive, but this command never returns]

 

("echo 1 > /proc/sys/vm/pagecache_ratio" works well)

 

Follow-ups

 

--- Sonic Zhang                                              2008-02-01 01:01:05

The min value should be 10%. How about limit the acceptable value in the driver?

 

--- Yi Li                                                    2008-02-01 04:07:08

where can I find the 10% limit? I am thinking 0% would disable page cache at

all.

 

--- Sonic Zhang                                              2008-02-01 04:15:33

Linux is based on page cache. It can not be disabled completely.

 

--- Sonic Zhang                                              2008-02-29 01:20:16

Fixed. Now 10 is the min value.

 

--- Mike Frysinger                                           2008-03-17 18:47:23

pagecache no longer in the kernel

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes