Opened 12 years ago

Closed 12 years ago

#286 closed defect (fixed)

tmpfs oversized in 8MB ram devices

Reported by: samot Owned by: developers
Priority: normal Milestone: 0.9/rc6
Component: base system Version:
Keywords: Cc: vanekt@…


both kamikaze and whrus:

Maximum tmpfs size limit for 8MB device is set over 3MB (half of MemTotal).
It's by far more then what would prevent system hang.
Reasonable value to let system work slowly (many code pages reloaded)
however without page alloc faults is around 600kB.

Proposed code:
(tmpfs sizes on 16 and 32MB RAM systems are roughly same as before)

Index: package/base-files/default/sbin/mount_root
--- package/base-files/default/sbin/mount_root  (revision 3137)
+++ package/base-files/default/sbin/mount_root  (working copy)
@@ -32,6 +32,7 @@
-mount none /tmp -t tmpfs -o nosuid,nodev,mode=1777,size=50%
+max_size=$(awk '/MemFree:/ {sz=$2*2/3-800;print int((sz>100)?sz:100)"k"}' /proc/meminfo)
+mount none /tmp -t tmpfs -o nosuid,nodev,mode=1777,size=${max_size:-40%}
 mkdir -p /dev/pts
 mount none /dev/pts -t devpts

tmpfs (and devfs) mounting code should be shared with firstboot (which mounts ramfs on /tmp!! Why??)

Attachments (0)

Change History (3)

comment:1 Changed 12 years ago by anonymous

need to check it, as soon as my wap works..

comment:2 Changed 12 years ago by kaloz

  • Milestone set to 1.0-rc6

comment:3 Changed 12 years ago by wbx

  • Resolution set to fixed
  • Status changed from new to closed

fixed in whiterussian svn. verified on wap54g v1.0. mbm added a similar fix:

post rc5 micro-images:
root@Linksys WAP54G:/# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 832.0k 832.0k 0 100% /rom
none 1.1M 12.0k 1.1M 1% /tmp
/dev/mtdblock/4 448.0k 356.0k 92.0k 79% /

May be some nano images with stripped down busybox (no httpd, no crond) would save some flash and ram space.

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.