Backed out changeset 235887eecb56 (bug 836654)
authorEd Morley <emorley@mozilla.com>
Thu, 14 Feb 2013 10:02:46 +0000
changeset 121882 02f17042062abc417d2d1d8a3e9ac3d0f7c5122a
parent 121881 f0a31d2c33fdfe718d75f647cd7b409dc420ea58
child 121883 ff4dc1018a27867cff11bbfc42c5cc79b5fe9306
push id24311
push userryanvm@gmail.com
push dateThu, 14 Feb 2013 22:16:46 +0000
treeherdermozilla-central@a373379d43cf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs836654
milestone21.0a1
backs out235887eecb561468cb20386ecd4f321f790a230a
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 235887eecb56 (bug 836654)
b2g/app/b2g.js
hal/Hal.cpp
hal/HalTypes.h
hal/gonk/GonkHal.cpp
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -547,32 +547,29 @@ pref("ui.showHideScrollbars", 1);
 pref("dom.ipc.processPriorityManager.enabled", true);
 pref("dom.ipc.processPriorityManager.backgroundGracePeriodMS", 1000);
 pref("dom.ipc.processPriorityManager.temporaryPriorityMS", 5000);
 
 // Kernel parameters for how processes are killed on low-memory.
 pref("gonk.systemMemoryPressureRecoveryPollMS", 5000);
 pref("hal.processPriorityManager.gonk.masterOomScoreAdjust", 0);
 pref("hal.processPriorityManager.gonk.masterKillUnderMB", 1);
-pref("hal.processPriorityManager.gonk.foregroundHighOomScoreAdjust", 67);
-pref("hal.processPriorityManager.gonk.foregroundHighKillUnderMB", 3);
-pref("hal.processPriorityManager.gonk.foregroundOomScoreAdjust", 134);
+pref("hal.processPriorityManager.gonk.foregroundOomScoreAdjust", 67);
 pref("hal.processPriorityManager.gonk.foregroundKillUnderMB", 4);
-pref("hal.processPriorityManager.gonk.backgroundPerceivableOomScoreAdjust", 200);
+pref("hal.processPriorityManager.gonk.backgroundPerceivableOomScoreAdjust", 134);
 pref("hal.processPriorityManager.gonk.backgroundPerceivableKillUnderMB", 5);
-pref("hal.processPriorityManager.gonk.backgroundHomescreenOomScoreAdjust", 267);
+pref("hal.processPriorityManager.gonk.backgroundHomescreenOomScoreAdjust", 200);
 pref("hal.processPriorityManager.gonk.backgroundHomescreenKillUnderMB", 5);
 pref("hal.processPriorityManager.gonk.backgroundOomScoreAdjust", 400);
 pref("hal.processPriorityManager.gonk.backgroundKillUnderMB", 8);
 pref("hal.processPriorityManager.gonk.notifyLowMemUnderMB", 10);
 
 // Niceness values (i.e., CPU priorities) for B2G processes.
 pref("hal.processPriorityManager.gonk.masterNice", 0);
-pref("hal.processPriorityManager.gonk.foregroundHighNice", 1);
-pref("hal.processPriorityManager.gonk.foregroundNice", 2);
+pref("hal.processPriorityManager.gonk.foregroundNice", 1);
 pref("hal.processPriorityManager.gonk.backgroundPerceivableNice", 10);
 pref("hal.processPriorityManager.gonk.backgroundHomescreenNice", 20);
 pref("hal.processPriorityManager.gonk.backgroundNice", 20);
 
 #ifndef DEBUG
 // Enable pre-launching content processes for improved startup time
 // (hiding latency).
 pref("dom.ipc.processPrelaunch.enabled", true);
--- a/hal/Hal.cpp
+++ b/hal/Hal.cpp
@@ -848,18 +848,16 @@ SetProcessPriority(int aPid, ProcessPrio
 
 // From HalTypes.h.
 const char*
 ProcessPriorityToString(ProcessPriority aPriority)
 {
   switch (aPriority) {
   case PROCESS_PRIORITY_MASTER:
     return "MASTER";
-  case PROCESS_PRIORITY_FOREGROUND_HIGH:
-    return "FOREGROUND_HIGH";
   case PROCESS_PRIORITY_FOREGROUND:
     return "FOREGROUND";
   case PROCESS_PRIORITY_BACKGROUND_PERCEIVABLE:
     return "BACKGROUND_PERCEIVABLE";
   case PROCESS_PRIORITY_BACKGROUND_HOMESCREEN:
     return "BACKGROUND_HOMESCREEN";
   case PROCESS_PRIORITY_BACKGROUND:
     return "BACKGROUND";
--- a/hal/HalTypes.h
+++ b/hal/HalTypes.h
@@ -76,17 +76,16 @@ typedef Observer<SwitchEvent> SwitchObse
 enum ProcessPriority {
   PROCESS_PRIORITY_BACKGROUND,
   PROCESS_PRIORITY_BACKGROUND_HOMESCREEN,
   PROCESS_PRIORITY_BACKGROUND_PERCEIVABLE,
   // Any priority greater than or equal to FOREGROUND is considered
   // "foreground" for the purposes of priority testing, for example
   // CurrentProcessIsForeground().
   PROCESS_PRIORITY_FOREGROUND,
-  PROCESS_PRIORITY_FOREGROUND_HIGH,
   PROCESS_PRIORITY_MASTER,
   NUM_PROCESS_PRIORITY
 };
 
 // Convert a ProcessPriority enum value to a string.  The strings returned by
 // this function are statically allocated; do not attempt to free one!
 //
 // If you pass an unknown process priority (or NUM_PROCESS_PRIORITY), we
--- a/hal/gonk/GonkHal.cpp
+++ b/hal/gonk/GonkHal.cpp
@@ -1044,38 +1044,34 @@ EnsureKernelLowMemKillerParamsSet()
   // GonkMemoryPressureMonitoring.cpp.)
 
   // Build the adj and minfree strings.
   nsAutoCString adjParams;
   nsAutoCString minfreeParams;
 
   const char* priorityClasses[] = {
     "master",
-    "foregroundHigh",
     "foreground",
     "backgroundPerceivable",
     "backgroundHomescreen",
     "background"
   };
   for (size_t i = 0; i < NS_ARRAY_LENGTH(priorityClasses); i++) {
-    // The system doesn't function correctly if we're missing these prefs, so
-    // crash loudly.
-
     int32_t oomScoreAdj;
     if (!NS_SUCCEEDED(Preferences::GetInt(nsPrintfCString(
           "hal.processPriorityManager.gonk.%sOomScoreAdjust",
           priorityClasses[i]).get(), &oomScoreAdj))) {
-      MOZ_CRASH();
+      continue;
     }
 
     int32_t killUnderMB;
     if (!NS_SUCCEEDED(Preferences::GetInt(nsPrintfCString(
           "hal.processPriorityManager.gonk.%sKillUnderMB",
           priorityClasses[i]).get(), &killUnderMB))) {
-      MOZ_CRASH();
+      continue;
     }
 
     // adj is in oom_adj units.
     adjParams.AppendPrintf("%d,", OomAdjOfOomScoreAdj(oomScoreAdj));
 
     // minfree is in pages.
     minfreeParams.AppendPrintf("%d,", killUnderMB * 1024 * 1024 / PAGE_SIZE);
   }
@@ -1123,19 +1119,16 @@ SetProcessPriority(int aPid, ProcessPrio
     priorityStr = "backgroundHomescreen";
     break;
   case PROCESS_PRIORITY_BACKGROUND_PERCEIVABLE:
     priorityStr = "backgroundPerceivable";
     break;
   case PROCESS_PRIORITY_FOREGROUND:
     priorityStr = "foreground";
     break;
-  case PROCESS_PRIORITY_FOREGROUND_HIGH:
-    priorityStr = "foregroundHigh";
-    break;
   case PROCESS_PRIORITY_MASTER:
     priorityStr = "master";
     break;
   default:
     MOZ_NOT_REACHED();
   }
 
   // Notice that you can disable oom_adj and renice by deleting the prefs