• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/corennnnn


Commit MetaInfo

修訂51d7ac0e4be1ab8a6ddce4da9baa193e7d0f4377 (tree)
時間2016-09-10 19:12:44
作者Zhao Wei Liew <zhaoweiliew@gmai...>
CommiterZhao Wei Liew

Log Message

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

Change Summary

差異

--- a/libcutils/iosched_policy.c
+++ b/libcutils/iosched_policy.c
@@ -57,8 +57,8 @@ int android_get_ioprio(int pid __android_unused, IoSchedClass *clazz, int *iopri
5757 }
5858
5959 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)) {
6262 __rtio_cgroup_supported = 1;
6363 } else {
6464 __rtio_cgroup_supported = 0;
@@ -74,9 +74,9 @@ int android_set_rt_ioprio(int tid, int rt) {
7474 }
7575
7676 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);
7878 } else {
79- fd = open("/sys/fs/cgroup/bfqio/tasks", O_WRONLY | O_CLOEXEC);
79+ fd = open("/dev/bfqio/tasks", O_WRONLY | O_CLOEXEC);
8080 }
8181
8282 if (fd < 0) {