lmkd: prevent the main thread from reaping synchronously
lmkd main thread is running at RT priority to prevent it from being blocked by other processes. However when all reaper threads are busy, lmkd will kill and reap the memory of the target process from the context of the main thread and that can cause two issues: 1. lmkd main thread gets blocked for considerable duration. 2. lmkd main and reaper threads might monopolize CPUs. To prevent these issues, when all reaper threads are busy, lmkd will send a SIGKILL but will not synchronously reap the memory of the target process. Bug: 238495258 Signed-off-by: Suren Baghdasaryan <surenb@google.com> Change-Id: I351c01229152946969e646b538a2494656c0cc85
This commit is contained in:
parent
67c467d4ec
commit
1c96a31917
|
|
@ -202,7 +202,7 @@ int Reaper::kill(const struct target_proc& target, bool synchronous) {
|
|||
return result;
|
||||
}
|
||||
|
||||
return is_reaping_supported() ? process_mrelease(target.pidfd, 0) : 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reaper::target_proc Reaper::dequeue_request() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue