aboutsummaryrefslogtreecommitdiff
path: root/include/linux/livepatch_sched.h
AgeCommit message (Collapse)AuthorFilesLines
2023-03-22livepatch,sched: Add livepatch task switching to cond_resched()Josh Poimboeuf1-0/+29
There have been reports [1][2] of live patches failing to complete within a reasonable amount of time due to CPU-bound kthreads. Fix it by patching tasks in cond_resched(). There are four different flavors of cond_resched(), depending on the kernel configuration. Hook into all of them. A more elegant solution might be to use a preempt notifier. However, non-ORC unwinders can't unwind a preempted task reliably. [1] https://lore.kernel.org/lkml/[email protected]/ [2] https://lkml.kernel.org/lkml/[email protected] Signed-off-by: Josh Poimboeuf <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Tested-by: Seth Forshee (DigitalOcean) <[email protected]> Link: https://lore.kernel.org/r/4ae981466b7814ec221014fc2554b2f86f3fb70b.1677257135.git.jpoimboe@kernel.org