Skip to content
New issue

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

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

Already on GitHub? # to your account

CONFIG_ZRAM=m #CONFIG_ZRAM_WRITEBACK is not set #2939

Closed
StuartIanNaylor opened this issue Apr 19, 2019 · 8 comments
Closed

CONFIG_ZRAM=m #CONFIG_ZRAM_WRITEBACK is not set #2939

StuartIanNaylor opened this issue Apr 19, 2019 · 8 comments
Labels
Waiting for internal comment Waiting for comment from a member of the Raspberry Pi engineering team

Comments

@StuartIanNaylor
Copy link

Can CONFIG_ZRAM_WRITEBACK=y as echo /dev/sdxx > /sys/block/zramX/backing_dev enables the write back also with further commands.
Zram is enabled as a module but for some reason CONFIG_ZRAM_WRITEBACK=n ?

@StuartIanNaylor StuartIanNaylor changed the title CONFIG_ZRAM=m # CONFIG_ZRAM_WRITEBACK is not set CONFIG_ZRAM=m CONFIG_ZRAM_WRITEBACK is not set Apr 19, 2019
@StuartIanNaylor StuartIanNaylor changed the title CONFIG_ZRAM=m CONFIG_ZRAM_WRITEBACK is not set CONFIG_ZRAM=m #CONFIG_ZRAM_WRITEBACK is not set Apr 19, 2019
@JamesH65
Copy link
Contributor

@pelwell @popcornmix Thoughts?

@JamesH65 JamesH65 added the Waiting for internal comment Waiting for comment from a member of the Raspberry Pi engineering team label Feb 13, 2020
@StuartIanNaylor
Copy link
Author

StuartIanNaylor commented Feb 20, 2020

Doesn't make sense to exclude a zram function that needs to be explicitly set to use.
The default is off unless as above echo /dev/sdxx > /sys/block/zramX/backing_dev is set when creating the zram device.
It will be exactly the same apart from if someone wants to use a backing_dev then they can
The more oomf you give the pi then with limited memory zram does make much more sense.

Never got round to playing with the write_back cache as it was not enabled on rasbian.
The kernel doc is an atrocious read that zram_config.deb is actually misconstrued implementation, but that is another matter.
On arch enabled, it seemed to work, but my memory is foggy now.
Zram on the Pi is a really good addition, backing cache prob will be rarely used, but disabling whilst including zram wouldn't seem to make sense?
It will have no effect unless declared and enabled via echo /dev/sdxx > /sys/block/zramX/backing_dev

PS going back to zam the old deb script of zram_config has hung about from its first implementation and multi-streams and many things means that now its actually broken.
Should not even be called zram_config as all it does is create a zram_swap badly for many reasons.

https://github.com/StuartIanNaylor/zram-swap-config

Above use hot_plug and is aware of other zram services and doesn't overwrite drives.
Also because it is swap you can change page_cluster so its ram optimised not HD.

I did another as example of https://github.com/StuartIanNaylor/zram-config which uses a multiple of zram options and why zram_config is a narrow name.

Pi4 2GB really benefits from zram but also the overlayfs with zram upper and merge to lower emphemeral would be great for SD based Socs like the pi. Write once to SD on shutdown...

But just examples as for the Pi Zram is really beneficial especially now it has more oomf and prob could do with some better scripting than my hacks but maybe a base example.
Writeback cache could be used but will have no detrimental effect as it needs to be declared on zram creation.

@jan-imal
Copy link

jan-imal commented Aug 6, 2024

I was just stumbling about this while testing some various scenarios on the rpi z2w.
Since this is open since 2019 and still not set (besides having CONFIG_ZRAM_MULTI_COMP=y would be nice too) - Is there any chance this might get changed? As already mentioned, it does not hurt and must be manually enabled, I would really appreciated to see this enabled in this module.

@pelwell
Copy link
Contributor

pelwell commented Aug 6, 2024

Adding ZRAM_WRITEBACK=y takes the uncompressed ARM64 binary module from 46kB to 59kB. ZRAM_MULTI_COMP=y adds an extra 6kB - which is not extravagant. Both of them seem to do nothing without being enabled explicitly via sysfs attributes.

Happy with this, @popcornmix?

pelwell added a commit to pelwell/linux that referenced this issue Aug 6, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: raspberrypi#2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
@pelwell
Copy link
Contributor

pelwell commented Aug 6, 2024

See #6304.

@popcornmix
Copy link
Collaborator

I'm ok with this.

pelwell added a commit that referenced this issue Aug 6, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
@pelwell
Copy link
Contributor

pelwell commented Aug 6, 2024

Thanks - merged.

@jan-imal
Copy link

jan-imal commented Aug 6, 2024

Thank you! For enabling and the quick response!

pelwell added a commit that referenced this issue Aug 7, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
pelwell added a commit that referenced this issue Aug 7, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
pelwell added a commit that referenced this issue Aug 7, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
@pelwell pelwell closed this as completed Aug 7, 2024
popcornmix pushed a commit that referenced this issue Aug 12, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Aug 13, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Aug 22, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Aug 22, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Aug 27, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Aug 30, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Aug 30, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Sep 2, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Sep 6, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Sep 10, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Sep 10, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Sep 12, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Sep 16, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Sep 16, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Oct 2, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Oct 2, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Oct 10, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Oct 10, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Oct 17, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Oct 23, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Nov 1, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Nov 8, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Nov 18, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this issue Nov 25, 2024
Add CONFIG_ZRAM_WRITEBACK=y and CONFIG_ZRAM_MULTI_COMP=y.

See: #2939

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Waiting for internal comment Waiting for comment from a member of the Raspberry Pi engineering team
Projects
None yet
Development

No branches or pull requests

5 participants