From a41c8f7a7b8070c919ac685d928e99b3164172c0 Mon Sep 17 00:00:00 2001 From: Kweku Adams Date: Mon, 19 Apr 2021 15:00:34 -0700 Subject: [PATCH] Adjust concurrency configuration. Change the concurrency configuration so that we use all available contexts when the screen is off and memory is available. Also adjust the parameters of some work types to make more sense in the tiered structure. Bug: 141645789 Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job Test: atest CtsJobSchedulerTestCases Change-Id: I3d1b334158b45523e13d3f3a302a9c4453aea159 --- .../server/job/JobConcurrencyManager.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apex/jobscheduler/service/java/com/android/server/job/JobConcurrencyManager.java b/apex/jobscheduler/service/java/com/android/server/job/JobConcurrencyManager.java index 366e1747d1678..7dbd803bcf81c 100644 --- a/apex/jobscheduler/service/java/com/android/server/job/JobConcurrencyManager.java +++ b/apex/jobscheduler/service/java/com/android/server/job/JobConcurrencyManager.java @@ -179,7 +179,7 @@ class JobConcurrencyManager { new WorkConfigLimitsPerMemoryTrimLevel( new WorkTypeConfig("screen_on_normal", 11, // defaultMin - List.of(Pair.create(WORK_TYPE_TOP, 2), Pair.create(WORK_TYPE_FGS, 1), + List.of(Pair.create(WORK_TYPE_TOP, 4), Pair.create(WORK_TYPE_FGS, 1), Pair.create(WORK_TYPE_EJ, 3), Pair.create(WORK_TYPE_BG, 2), Pair.create(WORK_TYPE_BGUSER_IMPORTANT, 1)), // defaultMax @@ -202,7 +202,7 @@ class JobConcurrencyManager { List.of(Pair.create(WORK_TYPE_TOP, 4), Pair.create(WORK_TYPE_FGS, 1), Pair.create(WORK_TYPE_EJ, 1)), // defaultMax - List.of(Pair.create(WORK_TYPE_BG, 1), + List.of(Pair.create(WORK_TYPE_BG, 2), Pair.create(WORK_TYPE_BGUSER_IMPORTANT, 1), Pair.create(WORK_TYPE_BGUSER, 1)) ), @@ -218,23 +218,23 @@ class JobConcurrencyManager { ); private static final WorkConfigLimitsPerMemoryTrimLevel CONFIG_LIMITS_SCREEN_OFF = new WorkConfigLimitsPerMemoryTrimLevel( - new WorkTypeConfig("screen_off_normal", 15, + new WorkTypeConfig("screen_off_normal", 16, // defaultMin List.of(Pair.create(WORK_TYPE_TOP, 4), Pair.create(WORK_TYPE_FGS, 2), Pair.create(WORK_TYPE_EJ, 3), Pair.create(WORK_TYPE_BG, 2), Pair.create(WORK_TYPE_BGUSER_IMPORTANT, 1)), // defaultMax - List.of(Pair.create(WORK_TYPE_BG, 6), + List.of(Pair.create(WORK_TYPE_BG, 10), Pair.create(WORK_TYPE_BGUSER_IMPORTANT, 2), Pair.create(WORK_TYPE_BGUSER, 3)) ), - new WorkTypeConfig("screen_off_moderate", 15, + new WorkTypeConfig("screen_off_moderate", 14, // defaultMin - List.of(Pair.create(WORK_TYPE_TOP, 6), Pair.create(WORK_TYPE_FGS, 2), + List.of(Pair.create(WORK_TYPE_TOP, 4), Pair.create(WORK_TYPE_FGS, 2), Pair.create(WORK_TYPE_EJ, 3), Pair.create(WORK_TYPE_BG, 2), Pair.create(WORK_TYPE_BGUSER_IMPORTANT, 1)), // defaultMax - List.of(Pair.create(WORK_TYPE_BG, 4), + List.of(Pair.create(WORK_TYPE_BG, 7), Pair.create(WORK_TYPE_BGUSER_IMPORTANT, 1), Pair.create(WORK_TYPE_BGUSER, 1)) ), @@ -243,7 +243,7 @@ class JobConcurrencyManager { List.of(Pair.create(WORK_TYPE_TOP, 4), Pair.create(WORK_TYPE_FGS, 1), Pair.create(WORK_TYPE_EJ, 2), Pair.create(WORK_TYPE_BG, 1)), // defaultMax - List.of(Pair.create(WORK_TYPE_BG, 1), + List.of(Pair.create(WORK_TYPE_BG, 3), Pair.create(WORK_TYPE_BGUSER_IMPORTANT, 1), Pair.create(WORK_TYPE_BGUSER, 1)) ),