-
Notifications
You must be signed in to change notification settings - Fork 9
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
Use PSI (Pressure Stall Information) api in mempressure plugin #14
base: master
Are you sure you want to change the base?
Conversation
Those are unrelated, MCE reports, the low memory killer kills. Please discuss elsewhere! |
Good work, this should work on any devices starting with Linux 4.4. |
Hi sailors. Do you have any plan to look at SFOS memory management? I believe that using PSI api in mempressure mce plugin and some userspace lowmemorykiller is the right way to go. Do you agree? I, and possibly other members of community, are able to to provide some help in this area. But it would be great to let us know your plans! |
I think this idea is good but I probably wouldn't remove the old support because this new PSI only works with newer kernel and therefore would remove the support for older devices. |
Is there a built binary that interested testers could experiment with? |
Basically: memory pressure signaling should be somewhat in sync with oom killer triggering. So that reacting to memory pressure signals would have a chance to postpone / avoid oom killing. And IIRC the problem is that kernel/android/whatnot oom killer logic varies in sanity from one device type to another and in some instances no amount of mce side tuning helps (say, when "we have stuff in fs caches" is taken as need to kill something soon) -> oom killing logic should be brought under control first. |
That is true, but also right now what MCE is reporting back is very broken, so this feature is completely useless right now. |
Not sure if older supported devices (Jolla C, Xperia 10, Xperia XA...) have PSI subsystem available/enabled, but keep in mind that current implementation is not working properly. Reporting "unknown" memory level will not make situation worse IMHO.
Yes, I made test release of my fork, I just merged current upstream master. just install mce with rpm:
then restart mce:
you can watch mce log in journal:
memory status with dbus-monitor:
to supress low-memory-killer:
when you wan to see memnotify debug log, stop mce service and run it on foreground with these arguments:
|
Jolla C, Xperia X would break anything else is fine. If possible supporting both the old and new interface would be best. |
As discussed on the SFOS forum [1][2] and community meeting [3], cgroup memory usage metric is not ideal for indicating system memory pressure. Main reason is that this metric contains reclaimable memory (I believe). PSI (Pressure Stall Information) api provides better insight what actual memory pressure is.
I believe that together with switch from kernel lowmemorykiller module to some user-space lowmemory killer (using PSI api), this change will improve Sailfish memory management.
Merge request is ready for review but it would be better to squash it before merge...