search for: __stop_try_switch

Displaying 1 result from an estimated 1 matches for "__stop_try_switch".

2023 Jan 27
1
[PATCH 0/2] vhost: improve livepatch switching for heavily loaded vhost worker kthreads
...lt;linux/cpu.h> #include <linux/stacktrace.h> +#include <linux/stop_machine.h> #include "core.h" #include "patch.h" #include "transition.h" @@ -334,6 +335,16 @@ static bool klp_try_switch_task(struct task_struct *task) return !ret; } +static int __stop_try_switch(void *arg) +{ + return klp_try_switch_task(arg) ? 0 : -EBUSY; +} + +static bool klp_try_switch_task_harder(struct task_struct *task) +{ + return !stop_one_cpu(task_cpu(task), __stop_try_switch, task); +} + /* * Sends a fake signal to all non-kthread tasks with TIF_PATCH_PENDING set. * Kthreads...