[OpenWrt-Devel] [PATCH] config: extend small_flash feature

Lucian Cristian luci at powerneth.ro
Fri Jun 1 07:34:46 EDT 2018


On 30.05.2018 20:22, Martin Tippmann wrote:
> find /usr |
> xargs md5sum

I made the test on tl-wr841n-v9 with luci selected

these are the changes to squashfs

--- a/config/Config-images.in
+++ b/config/Config-images.in
@@ -149,8 +149,15 @@ menu "Target Images"
                         int "Block size (in KiB)"
                         depends on TARGET_ROOTFS_SQUASHFS
                         default 64 if LOW_MEMORY_FOOTPRINT
+                       default 1024 if (SMALL_FLASH && 
!LOW_MEMORY_FOOTPRINT)
                         default 256

+               config SQUASHFS_FRAGMENT_CACHE_SIZE
+                       int "Number of fragments cached"
+                       depends on TARGET_ROOTFS_SQUASHFS
+                       default 1 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
+                       default 3
+
         menuconfig TARGET_ROOTFS_UBIFS
                 bool "ubifs"
                 default y if USES_UBIFS

the results:


after boot

root at OpenWrt:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.0M      3.0M         0 100% /rom
tmpfs                    13.4M     76.0K     13.4M   1% /tmp
tmpfs                    13.4M     48.0K     13.4M   0% /tmp/root
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock4          320.0K    220.0K    100.0K  69% /overlay
overlayfs:/overlay      320.0K    220.0K    100.0K  69% /
root at OpenWrt:/# free

              total       used       free     shared buffers     cached
Mem:         27520      23920       3600        124 2112       5748
-/+ buffers/cache:      16060      11460
Swap:            0          0          0
root at OpenWrt:/# cat /proc/meminfo
MemTotal:          27520 kB
MemFree:            3536 kB
MemAvailable:       9064 kB
Buffers:            2112 kB
Cached:             5748 kB
SwapCached:            0 kB
Active:             5892 kB
Inactive:           3120 kB
Active(anon):       1252 kB
Inactive(anon):       24 kB
Active(file):       4640 kB
Inactive(file):     3096 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          1160 kB
Mapped:             1784 kB
Shmem:               124 kB
Slab:               8876 kB
SReclaimable:       1216 kB
SUnreclaim:         7660 kB
KernelStack:         304 kB
PageTables:          208 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       13760 kB
Committed_AS:       3916 kB
VmallocTotal:    1048372 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB


after, ran 3 times


MemTotal:          27520 kB
MemFree:            1548 kB
MemAvailable:       8880 kB
Buffers:            2112 kB
Cached:             7268 kB
SwapCached:            0 kB
Active:             9612 kB
Inactive:            832 kB
Active(anon):       1164 kB
Inactive(anon):       24 kB
Active(file):       8448 kB
Inactive(file):      808 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          1072 kB
Mapped:             1688 kB
Shmem:               124 kB
Slab:               9508 kB
SReclaimable:       1784 kB
SUnreclaim:         7724 kB
KernelStack:         288 kB
PageTables:          184 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       13760 kB
Committed_AS:       3572 kB
VmallocTotal:    1048372 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB

root at OpenWrt:/# free
              total       used       free     shared    buffers cached
Mem:         27520      25940       1580        124 2112       7268
-/+ buffers/cache:      16560      10960
Swap:            0          0          0


Regards


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


More information about the openwrt-devel mailing list