Merge "snapuserd: Set taskprofile OtaProfiles"

This commit is contained in:
Akilesh Kailash 2022-09-27 19:36:59 +00:00 committed by Gerrit Code Review
commit 33081c0f90
2 changed files with 6 additions and 0 deletions

View file

@ -4,6 +4,7 @@ service snapuserd /system/bin/snapuserd
disabled
user root
group root system
task_profiles OtaProfiles
seclabel u:r:snapuserd:s0
service snapuserd_proxy /system/bin/snapuserd -socket-handoff

View file

@ -253,6 +253,11 @@ bool Worker::Init() {
bool Worker::RunThread() {
SNAP_LOG(INFO) << "Processing snapshot I/O requests....";
if (setpriority(PRIO_PROCESS, gettid(), kNiceValueForMergeThreads)) {
SNAP_PLOG(ERROR) << "Failed to set priority for TID: " << gettid();
}
// Start serving IO
while (true) {
if (!ProcessIORequest()) {