Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
KVM: Move VM's worker kthreads back to the original cgroups before ex…
…iting. VM worker kthreads can linger in the VM process's cgroup for sometime after KVM temrinates the VM process. KVM terminates the worker kthreads by calling kthread_stop() which waits on the signal generated by exit_mm() in do_exit() during kthread's exit. However, these kthreads are removed from the cgroup using cgroup_exit() call which happens after exit_mm() in do_exit(). A VM process can terminate between the time window of exit_mm() to cgroup_exit(), leaving only worker kthreads in the cgroup. Moving worker kthreads back to the original cgroup (kthreadd_task's cgroup) makes sure that cgroup is empty as soon as the main VM process is terminated. Signed-off-by: Vipin Sharma <vipinsh@google.com>
- Loading branch information