2,871,331 events, 1,573,122 push events, 2,327,705 commit messages, 167,434,378 characters
mm: process_reclaim: Modified the driver to kill processes.
This is marked HIGHLY EXPERIMENTAL. Use at your own risk.
If you want to test this, ZRAM/SWAP must be enabled!
While playing around with various low memory solutions on Android, like the stock Android LowMemoryKiller and Sultan's Simple LMK, I was unsatisfied with the way with which they handled low memory.
Here are my reasons,but I may be wrong/unclear.Please do feel free to correct me.
-
Android LMK is too aggressive,but setting minfrees/adjs help to an extent.During my testing,I found that LMK depletes swap-pages to 0, and a thrashing situation ensues.When this thrashing situation continues for a long time,OOM Killer comes into play,and starts killing tasks at random.This is undesirable.
-
Sultan's SLMK is a bit better,but still aggressive,in the sense that it starts to kill tasks even if there is a short memory spike.This is undesirable, as there may be a situation wherein many swap pages are available,but since tasks are being killed when those memory spikes occur,swap pages may not be used as much as they are freed.These kind of situations are frequent when using SLMK during my testing.
In short,I was unable to keep many apps open as per the potential of my device's RAM and ZRAM.The above-mentioned solutions also killed Android services at random, which proved to be annoying, for example when I had a music player and apps in the background,the music player would abruptly be killed.
My objective is to:
-
Keep important tasks like Android services running until they are closed by the user.
-
Kill apps as little as possible,or specifically,killing apps based on the total time spent on it.This means that, apps with larger usage time get killed more rarely,and apps with lesser usage times get killed frequently.
This is my humble(flawed?) attempt at handling a low-memory situation in a better manner.
I used the Process Reclaim driver as the base for this purpose. The reason why I used this driver was that,its function was to reclaim ANONYMOUS(MM_ANON) pages from each scanned task as much as possible(according to per_swap_size), so that apps never get killed,and memory gets reclaimed in the end.
In theory,this sounds good.While testing though,I ran into a very serious problem: system freezes.Too much memory pressure and less ANONYMOUS pages to reclaim rendered the system unusable for a while,which was NOT cool.
Therefore,the only way to prevent these system freezes was to kill some tasks,but at the appropriate time.This is the approach I took:
-
We keep reclaiming pages if they are above defined threshold (free_swap_limit).
-
Once the swap goes below a percentage(free_percent) above/below the threshold, we start to collect tasks to kill.
-
We then sort those tasks based on their last accessed (stime+utime), and then start killing the tasks with the lowest (stime+utime).We stop killing tasks once the number of swap pages are above the threshold (free_swap_limit). I specifically sorted according to acct_timexpd,see kernel/tsacct.c for more details(CONFIG_TASK_XACCT).
So, in theory, this should reclaim ANONYMOUS pages more often, and kill tasks less,depending on the memory pressure.
-
I've renamed some variables in the driver, so that their values don't get reset by the values set by the ROM, specifically, init.qcom.post_boot.sh
-
Removed min_score_adj, I've now added a blacklist of OOM_SCORE_ADJ's so that the ones in the blacklist don't get their MM_ANON pages reclaimed.This is important,because some running services/apps may glitch(this happens rarely).For example, while playing music, I experienced crackling sounds at random intervals.
-
Added functionality to wake up oom_reaper after killing a task,so that once the task is killed,all its pages(?) will be reaped. (Taken from the lowmemorykiller.c code)
-
Added some code bits from SLMK(marked in the comments).
-
Removed traces from the driver.
Minchan Kim and Vinayak Menon for the Process Reclaim driver, and Sultan AlSawaf(kerneltoast) for the appropriate code bits.
Signed-off-by: darkhz kmachanwenw@gmail.com
FOLIO-2727 temporarily disable flakey tests (#143)
I love this test. It is my favorite test in all off my nightmare tests. I love this test the most because it always succeeds when I run it in isolation and always fails when I run it as part of the suite. This makes it extra special and extra deserving of my love. NightmareJS and consistent test results walk hand in hand together like love, marriage, and ritual infanticide. A test is a test of course, I Jest, and no one can talk to a test unless, that is, oh hell, unless you spell, your test like R-T-L. What if the BigTest is not big enough? He cries. Writing more tests in NightmareJS will liquify the nerves of the sentient beings it begins. It is a journey. It is a journey up a river of c͒ͪo͛ͫrruption. He comes. It is a journey across the water in search of a m̡adman, in se̶arch of darkne̸ss, into darkness, into the heart of darkness, it is darknes̸s̸. My NightmareJS is a waking dream. Goodnight darkness, goodnight test, goodnight ̕un̨ho͞ly radiańcé destro҉yer of enli̍̈́̂̈́ghtenment. WE ARE LOST. Goodnight enzymes, goodn̷ight proteinŚ͖̩͇̗̪̏̈́, goodnight little bowl of m̷̙̲̝͖ͭ̏ͥͮ͟uͮ͏̮̪̝͍̲̖͊̒ͪͩͬ̚̚͜s̴̟̟͙̞̑ͩ͌͝h̨̥̫͎̭ͯ̿̔̀ͅ. HUSH. The end is nigh.
Refs FOLIO-2727
website: Fix style in 0.9.2 release notes
This commit fixes the style so the paragraph is not dedented and the next item is not shown in the same line.
The first issue is "fixed" by just making it one paragraph, as no other alternatives were found that worked correctly in hugo 0.57.0 (didn't explored ugly hacks like manually indent, etc.).
The second issue (item in the wrong line) was reproduced locally with hugo 0.57.0. It didn't happen with other newer hugo versions (tested several >= 0.62.2 versions), however this patch is rendered correcly on new and old hugo versions.
This patch was tested with hugo 0.57.0, as this was the only version I found to render the site locally as similar as possible to the current website. In particular, it renders the site with the horrible black thing rendered when written like this1, and properly includes the site header logo (is not shown with newer hugo versions). However, some other changes might be required if the production site is rendered using another hugo version.
Fixes: #548
TP1803: Fix lockscreen setup
- yeah fuck you too google
Signed-off-by: Kuba Wojciechowski nullbytepl@gmail.com
TP1803: Update blobs from laurel_sprout 10
Q: Why A: Because fuck you it works I'm not touching those fucking blobs any more
Signed-off-by: Kuba Wojciechowski nullbytepl@gmail.com
Holy hell I fucked up the update calculation badly. This should work tho.
Bouns Activities
Bouns Activities
Side note: I guess nobody will ever read those update notes... Why am I still trying to write them? I wonder... Well... If you should read this message: Congratulations! You wasted a minute of your life reading this useless message.
Anyways aside from that I hope - whoever you are - that you are doing fine. I am bored... I don't know what else to write... Maybe I should just stop writing? He continued for he doesn't know I should probably be doing something prodoctive now but I am feeling so lazy... Eventually I will get a better idea than continuing this message.
Well, fare well...