system/corennnnn
修訂 | 51d7ac0e4be1ab8a6ddce4da9baa193e7d0f4377 (tree) |
---|---|
時間 | 2016-09-10 19:12:44 |
作者 | Zhao Wei Liew <zhaoweiliew@gmai...> |
Commiter | Zhao Wei Liew |
cutils: iosched_policy: Access BFQIO cgroup in /dev/bfqio
AOSP doesn't mount cgroups in /sys/fs/cgroup, but in /dev/.
Follow what AOSP does.
Change-Id: I40d2241e3e5c41612d3a54d22981d3250f8b1ed6
@@ -57,8 +57,8 @@ int android_get_ioprio(int pid __android_unused, IoSchedClass *clazz, int *iopri | ||
57 | 57 | } |
58 | 58 | |
59 | 59 | static void __initialize_rtio(void) { |
60 | - if (!access("/sys/fs/cgroup/bfqio/tasks", W_OK) || | |
61 | - !access("/sys/fs/cgroup/bfqio/rt-display/tasks", W_OK)) { | |
60 | + if (!access("/dev/bfqio/tasks", W_OK) || | |
61 | + !access("/dev/bfqio/rt-display/tasks", W_OK)) { | |
62 | 62 | __rtio_cgroup_supported = 1; |
63 | 63 | } else { |
64 | 64 | __rtio_cgroup_supported = 0; |
@@ -74,9 +74,9 @@ int android_set_rt_ioprio(int tid, int rt) { | ||
74 | 74 | } |
75 | 75 | |
76 | 76 | if (rt) { |
77 | - fd = open("/sys/fs/cgroup/bfqio/rt-display/tasks", O_WRONLY | O_CLOEXEC); | |
77 | + fd = open("/dev/bfqio/rt-display/tasks", O_WRONLY | O_CLOEXEC); | |
78 | 78 | } else { |
79 | - fd = open("/sys/fs/cgroup/bfqio/tasks", O_WRONLY | O_CLOEXEC); | |
79 | + fd = open("/dev/bfqio/tasks", O_WRONLY | O_CLOEXEC); | |
80 | 80 | } |
81 | 81 | |
82 | 82 | if (fd < 0) { |