OSDN Git Service
(root)
/
android-x86
/
frameworks-native.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1db4157
)
Use set_sched_policy to put dexopt operations in SP_BACKGROUND cgroup
author
Brian Carlstrom
<bdc@google.com>
Fri, 8 Aug 2014 07:52:22 +0000
(
00:52
-0700)
committer
The Android Automerger
<android-build@google.com>
Mon, 11 Aug 2014 20:32:43 +0000
(13:32 -0700)
Bug:
15927194
(cherry picked from commit
0378aaf257aee92539d30543914a50c4481c6a18
)
Change-Id: I462b5ac256c4d091ed4023cf4b97dd6a4abcaa5f
cmds/installd/commands.c
patch
|
blob
|
history
diff --git
a/cmds/installd/commands.c
b/cmds/installd/commands.c
index
bd721c8
..
f05ce61
100644
(file)
--- a/
cmds/installd/commands.c
+++ b/
cmds/installd/commands.c
@@
-17,6
+17,7
@@
#include <inttypes.h>
#include <sys/capability.h>
#include "installd.h"
+#include <cutils/sched_policy.h>
#include <diskusage/dirsize.h>
#include <selinux/android.h>
@@
-950,6
+951,10
@@
int dexopt(const char *apk_path, uid_t uid, int is_public,
ALOGE("capset failed: %s\n", strerror(errno));
exit(66);
}
+ if (set_sched_policy(0, SP_BACKGROUND) < 0) {
+ ALOGE("set_sched_policy failed: %s\n", strerror(errno));
+ exit(70);
+ }
if (flock(out_fd, LOCK_EX | LOCK_NB) != 0) {
ALOGE("flock(%s) failed: %s\n", out_path, strerror(errno));
exit(67);