[v3,0/3] livepatch,sched: Add livepatch task switching to cond_resched()

Message ID cover.1677257135.git.jpoimboe@kernel.org
Headers
Series livepatch,sched: Add livepatch task switching to cond_resched() |

Message

Josh Poimboeuf Feb. 24, 2023, 4:49 p.m. UTC
  v3:
- Add barriers (pmladek)
- Update comments

v2:
- Avoid calling klp_cond_resched_disable() in klp_cancel_transition()
- Fix race in klp_reverse_transition()

Fix patching stalls caused by busy kthreads.

Josh Poimboeuf (3):
  livepatch: Skip task_call_func() for current task
  livepatch,sched: Add livepatch task switching to cond_resched()
  vhost: Fix livepatch timeouts in vhost_worker()

 drivers/vhost/vhost.c           |   3 +-
 include/linux/livepatch.h       |   1 +
 include/linux/livepatch_sched.h |  29 ++++++++
 include/linux/sched.h           |  20 ++++--
 kernel/livepatch/core.c         |   1 +
 kernel/livepatch/transition.c   | 113 +++++++++++++++++++++++++++-----
 kernel/sched/core.c             |  64 +++++++++++++++---
 7 files changed, 200 insertions(+), 31 deletions(-)
 create mode 100644 include/linux/livepatch_sched.h
  

Comments

Seth Forshee (DigitalOcean) Feb. 28, 2023, 4:39 p.m. UTC | #1
On Fri, Feb 24, 2023 at 08:49:58AM -0800, Josh Poimboeuf wrote:
> v3:
> - Add barriers (pmladek)
> - Update comments
> 
> v2:
> - Avoid calling klp_cond_resched_disable() in klp_cancel_transition()
> - Fix race in klp_reverse_transition()
> 
> Fix patching stalls caused by busy kthreads.

I ran the v3 patches through my reproducer, still working great.

Thanks,
Seth
  
Miroslav Benes March 30, 2023, 4:11 p.m. UTC | #2
On Fri, 24 Feb 2023, Josh Poimboeuf wrote:

> v3:
> - Add barriers (pmladek)
> - Update comments
> 
> v2:
> - Avoid calling klp_cond_resched_disable() in klp_cancel_transition()
> - Fix race in klp_reverse_transition()
> 
> Fix patching stalls caused by busy kthreads.
> 
> Josh Poimboeuf (3):
>   livepatch: Skip task_call_func() for current task
>   livepatch,sched: Add livepatch task switching to cond_resched()
>   vhost: Fix livepatch timeouts in vhost_worker()
> 
>  drivers/vhost/vhost.c           |   3 +-
>  include/linux/livepatch.h       |   1 +
>  include/linux/livepatch_sched.h |  29 ++++++++
>  include/linux/sched.h           |  20 ++++--
>  kernel/livepatch/core.c         |   1 +
>  kernel/livepatch/transition.c   | 113 +++++++++++++++++++++++++++-----
>  kernel/sched/core.c             |  64 +++++++++++++++---
>  7 files changed, 200 insertions(+), 31 deletions(-)
>  create mode 100644 include/linux/livepatch_sched.h

Late, so just recording it here...

Acked-by: Miroslav Benes <mbenes@suse.cz>

Thanks for improving the situation, Josh.

M