I was just reading https://bkhome.org/news/202205/a-rethin ... cture.html and a question i had is, why bother formatting the zram device as ext2 and using it directly rather than using a tmpfs with zram as swap?
I have tested this a lot on my 2GiB ram computer and tmpfs files can in fact get moved to swap devices - including zram. This defers the compression until it is actually necessary and allows the zram swap device to get used for both tmpfs files and program memory alike. Is there a benefit to using ext2 on the zram device instead of doing this that I'm not seeing?
Thanks for the interesting project updates!
EDIT: i wonder also if this would help with "the elephant" of containers, since a tmpfs could be created for each container very cheaply, and space is only used up as necessary. you could even limit how much data each container can create by changing the tmpfs sizes, if you wanted. and they would all share the same zram swap device as necessary over the runtime of the system.
this is technically also possible with ext2 on zram, except with zram you have to decide how many block devices to create when you load the module if i recall correctly, so you would have to pre-allocate them so to speak and managing them would get messy