Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a796c10 authored by Tim Murray's avatar Tim Murray
Browse files

compaction: fix two small bugs

1. Compaction thread was not ending up in the right cpuset after
the move to phenotype because the thread would not be started when
AMS tried to set it. Add a new cpuset change, but leave the existing
one once we add a default-on property.

2. Don't compact processes with oom_adj 1001.

Test: boots, works, CompactionThread in the right cpuset
bug 119988524

Change-Id: I02625d7925e572c15e74ae172f438e9e1130d499
parent bd849186
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -170,6 +170,9 @@ public final class AppCompactor {
            updateCompactionThrottles();
            updateStatsdSampleRate();
        }
        Process.setThreadGroupAndCpuset(mCompactionThread.getThreadId(),
                Process.THREAD_GROUP_SYSTEM);

    }

    /**
+3 −2
Original line number Diff line number Diff line
@@ -1709,8 +1709,9 @@ public final class OomAdjuster {
                        (app.curAdj == ProcessList.PREVIOUS_APP_ADJ ||
                                app.curAdj == ProcessList.HOME_APP_ADJ)) {
                    mAppCompact.compactAppSome(app);
                } else if (app.setAdj < ProcessList.CACHED_APP_MIN_ADJ &&
                        app.curAdj >= ProcessList.CACHED_APP_MIN_ADJ) {
                } else if (app.setAdj < ProcessList.CACHED_APP_MIN_ADJ
                        && app.curAdj >= ProcessList.CACHED_APP_MIN_ADJ
                        && app.curAdj <= ProcessList.CACHED_APP_MAX_ADJ) {
                    mAppCompact.compactAppFull(app);
                }
            }