Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1311 - procd: mount /tmp with zram #7353

Open
openwrt-bot opened this issue Jan 29, 2018 · 6 comments
Open

FS#1311 - procd: mount /tmp with zram #7353

openwrt-bot opened this issue Jan 29, 2018 · 6 comments
Labels

Comments

@openwrt-bot
Copy link

Ansuel:

Supply the following if possible:

  • Device problem occurs on all device
  • Software versions of OpenWrt/LEDE: Trunk

If i select this option in menuconfig, At the boot procd mount the wrong size of ram. I have 512mb of ram and procd mount only 11mb of ram. More detail here.
http://lists.infradead.org/pipermail/lede-dev/2018-January/011008.html

https://forum.lede-project.org/t/no-space-left-in-tmp/11000/14

@openwrt-bot
Copy link
Author

vortigont:

i think this is the place where it goes wrong - max RAM size of 32Mb is hardcoded here

https://git.openwrt.org/?p=project/procd.git;a=blob;f=initd/zram.c;h=b41bfd999ba2630f086cba140e5fdcd7aabfac6b;hb=HEAD#l46

And than it get's divided by 2, which results in about 16Mb minus EXT4 overhead

https://git.openwrt.org/?p=project/procd.git;a=blob;f=initd/zram.c;h=b41bfd999ba2630f086cba140e5fdcd7aabfac6b;hb=HEAD#l98

@openwrt-bot
Copy link
Author

yousong:

The changelog indicates that this is an intentional limit [1]. Add john to the thread ;)

[1] https://git.openwrt.org/?p=project/procd.git;a=commitdiff;h=7676df3226da5391c2dfda2ed29a40500e04e15b

@openwrt-bot
Copy link
Author

vortigont:

Well, maybe it's time to increase this limit a little bit :)

@openwrt-bot
Copy link
Author

alex1452:

Is there any update for this? I have exactly the same problem that my tmp is only 16MB on a router with 4GB RAM available. This makes the system unusable for me. Can we raise severity and/or impact?

@openwrt-bot
Copy link
Author

rdslw:

This bug reportedly creates severe problems for any user who enable zram.

Reason is, that these days typical openwrt firmware size is 12..20MB, while at the same time hardcoded zram limit of 16MB, means actually around 11.5MB on tmp (because ext4 minimal journal we use is 1024 of 4096 block, being 4MB).

That means, after flashing device with zram enabled firmware you're unable to flash anything else (at least easily ;) because new firmware does not fit anymore on /tmp. Hence once you flash with zram enabled you can not reflash.

Multiple cases are reported on forums.

I propose (patch attached) to increase hardcoded limit to 64MB (from current of 16MB), WHILE leaving in place safety check that zram CAN NOT take more than half of ram. (NB: patch uses 128MB because later it is divided by 2).

@openwrt-bot
Copy link
Author

bjonglez:

Please send the patch on the mailing list: https://openwrt.org/submitting-patches

You need to add a description, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant