Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e780402 authored by Akilesh Kailash's avatar Akilesh Kailash
Browse files

snapuserd: Set taskprofile OtaProfiles



Since update-engine already has this profile set,
it is better to have similar profile for the daemon
so that threads don't run at high priority.

Additionally, lower the nice value for worker
threads.

No change in the OTA install time observed.

Bug: 237490659
Test: Full OTA on Pixel
Change-Id: I53ec8c647eb781965792683b04621e6fec5eb5f2
Signed-off-by: default avatarAkilesh Kailash <akailash@google.com>
parent 751cdc94
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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
+5 −0
Original line number Diff line number Diff line
@@ -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()) {