Hi, I am some questions and LMK's thresholds: 1. I am trying to understand what is the reason for setting the default values of minfree and adj to the following in lowmemorykiller.c? Why not just use a linear mapping? for example, if the free memory is below 50%, then just kill all processes which have prirority lower than 50% of the highest priority plus or minus offset? In other words, some kind of linear mapping? If a log mapping is required, then one can just that no?
static int lowmem_adj[6] = { 0, 1, 6, 12, }; static int lowmem_minfree[6] = { 3 * 512, /* 6MB */ 2 * 1024, /* 8MB */ 4 * 1024, /* 16MB */ 16 * 1024, /* 64MB */ }; 2. I see that the framework code (userspace) overrides these values on boot in Line 90 of [1]. I find this a bit overkill. Why can't the kernel just figure out what values in needs and why does userspace have to tell the kernel? I have seen in the past that tuning the MM system too much from userspace (such as the zone watermarks) have been frowned up alot so it seems counter intuitive to me to allow userspace to be allowed in the LMK case. [1] https://android.googlesource.com/platform/frameworks/base/+/master/services/java/com/android/server/am/ProcessList.java Thanks a lot and Regards, Joel -- -- unsubscribe: android-kernel+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-kernel --- You received this message because you are subscribed to the Google Groups "Android Linux Kernel Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-kernel+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.