diff options
Diffstat (limited to 'libcutils/sched_policy.c')
-rw-r--r-- | libcutils/sched_policy.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libcutils/sched_policy.c b/libcutils/sched_policy.c index 83222f4..8c26cdd 100644 --- a/libcutils/sched_policy.c +++ b/libcutils/sched_policy.c @@ -61,6 +61,7 @@ static int bg_cgroup_fd = -1; static int fg_cgroup_fd = -1; // File descriptors open to /dev/cpuset/../tasks, setup by initialize, or -1 on error +static int system_bg_cpuset_fd = -1; static int bg_cpuset_fd = -1; static int fg_cpuset_fd = -1; @@ -126,6 +127,11 @@ static void __initialize(void) { fg_cpuset_fd = open(filename, O_WRONLY | O_CLOEXEC); filename = "/dev/cpuset/background/tasks"; bg_cpuset_fd = open(filename, O_WRONLY | O_CLOEXEC); + filename = "/dev/cpuset/system-background/tasks"; + system_bg_cpuset_fd = open(filename, O_WRONLY | O_CLOEXEC); + if (system_bg_cpuset_fd < 0) { + SLOGE("initialize of system-bg failed: %s\n", strerror(errno)); + } } #endif @@ -260,6 +266,9 @@ int set_cpuset_policy(int tid, SchedPolicy policy) case SP_AUDIO_SYS: fd = fg_cpuset_fd; break; + case SP_SYSTEM: + fd = system_bg_cpuset_fd; + break; default: fd = -1; break; |