Loading fs_mgr/libsnapshot/snapuserd/user-space-merge/merge_worker.cpp +7 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ #include <libsnapshot/cow_format.h> #include <pthread.h> #include <android-base/properties.h> #include "merge_worker.h" #include "snapuserd_core.h" #include "utility.h" Loading Loading @@ -179,8 +181,8 @@ bool MergeWorker::MergeReplaceZeroOps() { bufsink_.ResetBufferOffset(); if (snapuserd_->IsIOTerminated()) { SNAP_LOG(ERROR) << "MergeReplaceZeroOps: MergeWorker threads terminated - shutting down merge"; SNAP_LOG(ERROR) << "MergeReplaceZeroOps: MergeWorker threads terminated - shutting " "down merge"; return false; } } Loading Loading @@ -577,8 +579,10 @@ bool MergeWorker::Run() { SNAP_LOG(ERROR) << "Merge terminated early..."; return true; } auto merge_thread_priority = android::base::GetUintProperty<uint32_t>( "ro.virtual_ab.merge_thread_priority", ANDROID_PRIORITY_BACKGROUND); if (!SetThreadPriority(ANDROID_PRIORITY_BACKGROUND)) { if (!SetThreadPriority(merge_thread_priority)) { SNAP_PLOG(ERROR) << "Failed to set thread priority"; } Loading fs_mgr/libsnapshot/snapuserd/user-space-merge/read_worker.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -14,11 +14,14 @@ * limitations under the License. */ #include <android-base/properties.h> #include <libsnapshot/cow_format.h> #include <pthread.h> #include "read_worker.h" #include "snapuserd_core.h" #include "user-space-merge/worker.h" #include "utility.h" namespace android { Loading Loading @@ -259,8 +262,10 @@ bool ReadWorker::Run() { SNAP_LOG(INFO) << "Processing snapshot I/O requests...."; 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(ANDROID_PRIORITY_NORMAL)) { if (!SetThreadPriority(worker_thread_priority)) { SNAP_PLOG(ERROR) << "Failed to set thread priority"; } Loading Loading
fs_mgr/libsnapshot/snapuserd/user-space-merge/merge_worker.cpp +7 −3 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ #include <libsnapshot/cow_format.h> #include <pthread.h> #include <android-base/properties.h> #include "merge_worker.h" #include "snapuserd_core.h" #include "utility.h" Loading Loading @@ -179,8 +181,8 @@ bool MergeWorker::MergeReplaceZeroOps() { bufsink_.ResetBufferOffset(); if (snapuserd_->IsIOTerminated()) { SNAP_LOG(ERROR) << "MergeReplaceZeroOps: MergeWorker threads terminated - shutting down merge"; SNAP_LOG(ERROR) << "MergeReplaceZeroOps: MergeWorker threads terminated - shutting " "down merge"; return false; } } Loading Loading @@ -577,8 +579,10 @@ bool MergeWorker::Run() { SNAP_LOG(ERROR) << "Merge terminated early..."; return true; } auto merge_thread_priority = android::base::GetUintProperty<uint32_t>( "ro.virtual_ab.merge_thread_priority", ANDROID_PRIORITY_BACKGROUND); if (!SetThreadPriority(ANDROID_PRIORITY_BACKGROUND)) { if (!SetThreadPriority(merge_thread_priority)) { SNAP_PLOG(ERROR) << "Failed to set thread priority"; } Loading
fs_mgr/libsnapshot/snapuserd/user-space-merge/read_worker.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -14,11 +14,14 @@ * limitations under the License. */ #include <android-base/properties.h> #include <libsnapshot/cow_format.h> #include <pthread.h> #include "read_worker.h" #include "snapuserd_core.h" #include "user-space-merge/worker.h" #include "utility.h" namespace android { Loading Loading @@ -259,8 +262,10 @@ bool ReadWorker::Run() { SNAP_LOG(INFO) << "Processing snapshot I/O requests...."; 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(ANDROID_PRIORITY_NORMAL)) { if (!SetThreadPriority(worker_thread_priority)) { SNAP_PLOG(ERROR) << "Failed to set thread priority"; } Loading