i do not like when this is the runtime behavior of my program
Conversation
Replying to
what's even going on? one of your stack slots is way at the other end of a numa?
3
5
dammit are you snooping my patent applications again
2
6
It's an actual Linux kernel feature called zram deployed by modern Android phones.
kernel.org/doc/Documentat
Android hasn't ever used actual swap but rather has a certain amount of the memory as a compressed memory region. More recently, there's support for writeback from it.
4
2
compressing swapped out pages is a super good idea, or at least it was before SSDs; probably still is
2
1
Makes sense even if you don’t swap them. Compressing in-memory is a win.
1
4
Yeah, that's what zram does. It's in-memory compression with support for writeback. The writeback is generally very conservative. This is the setup used for Pixels:
[ro.zram.first_wb_delay_mins]: [1440]
[ro.zram.mark_idle_delay_mins]: [60]
[ro.zram.periodic_wb_delay_hours]: [24]
The logic for the writeback is in android.googlesource.com/platform/frame.
The configuration above means it marks the pages in zram as idle 60 minutes after boot. 24h after boot, it flushes out any remaining pages it marked as idle to storage. Then, it marks zram pages idle and waits 24h again.
1
2
The pages have to be unused for a whole day to actually get written out to storage. Having the storage writeback is actually relatively recent. There was traditionally never any storage-based swap on Android. Separately from this, there's also very aggressive idle app compaction.
Yeah, I did a bunch of work on the iOS WKdm implementation.
1
7
That gave me a chuckle when I came across it.
(In WKdm_decompress on arm64)
4
1
20
Show replies





