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

Commit a8f13069 authored by Liana Kazanova's avatar Liana Kazanova Committed by Gerrit Code Review
Browse files

Revert "reupload: libsnapshot: set thread priority"

This reverts commit 00e1b61b.

Reason for revert: DroidMonitor: Potential culprit for b/348041418 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: Ib7422cc7bfb7815ede814fb5f0ee1d4537fe52d2
parent 00e1b61b
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -577,10 +577,8 @@ bool MergeWorker::Run() {
        SNAP_LOG(ERROR) << "Merge terminated early...";
        SNAP_LOG(ERROR) << "Merge terminated early...";
        return true;
        return true;
    }
    }
    auto merge_thread_priority = android::base::GetUintProperty<uint32_t>(
            "ro.virtual_ab.merge_thread_priority", ANDROID_PRIORITY_BACKGROUND);


    if (!SetThreadPriority(merge_thread_priority)) {
    if (!SetThreadPriority(ANDROID_PRIORITY_BACKGROUND)) {
        SNAP_PLOG(ERROR) << "Failed to set thread priority";
        SNAP_PLOG(ERROR) << "Failed to set thread priority";
    }
    }


+1 −5
Original line number Original line Diff line number Diff line
@@ -17,10 +17,8 @@
#include <libsnapshot/cow_format.h>
#include <libsnapshot/cow_format.h>
#include <pthread.h>
#include <pthread.h>


#include "android-base/properties.h"
#include "read_worker.h"
#include "read_worker.h"
#include "snapuserd_core.h"
#include "snapuserd_core.h"
#include "user-space-merge/worker.h"
#include "utility.h"
#include "utility.h"


namespace android {
namespace android {
@@ -261,10 +259,8 @@ bool ReadWorker::Run() {
    SNAP_LOG(INFO) << "Processing snapshot I/O requests....";
    SNAP_LOG(INFO) << "Processing snapshot I/O requests....";


    pthread_setname_np(pthread_self(), "ReadWorker");
    pthread_setname_np(pthread_self(), "ReadWorker");
    auto worker_thread_priority = android::base::GetUintProperty<uint32_t>(
            "ro.virtual_ab.worker_thread_priority", ANDROID_PRIORITY_NORMAL);


    if (!SetThreadPriority(worker_thread_priority)) {
    if (!SetThreadPriority(ANDROID_PRIORITY_NORMAL)) {
        SNAP_PLOG(ERROR) << "Failed to set thread priority";
        SNAP_PLOG(ERROR) << "Failed to set thread priority";
    }
    }