Skip to content

rcu,nohz,kvm: use RCU extended quiescent state when running KVM guest

[email protected] kvm linux-s390 lkml 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 28 repliesIn review
  2. v14 patches 9 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5rcu,nohz: add state parameter to context_tracking_user_enter/exitinclude/linux/context_tracking.h kernel/context_tracking.c+11 -1115 replies
2/5rcu,nohz: run vtime_user_enter/exit only when state == IN_USERkernel/context_tracking.c+4 -20 replies
3/5nohz,kvm: export context_tracking_user_enter/exitkernel/context_tracking.c+2 -01 reply
4/5kvm,rcu,nohz: use RCU extended quiescent state when running KVM guestinclude/linux/context_tracking.h include/linux/context_tracking_state.h include/linux/kvm_host.h+10 -23 replies
5/5nohz: add stub context_tracking_is_enabledinclude/linux/context_tracking_state.h+2 -01 reply

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchPaul E. McKenney
1/5A-b
2/5
3/5A-b
4/5A-b
5/5A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] rcu,nohz,kvm: use RCU extended quiescent state when running KVM guest

When running a KVM guest on a system with NOHZ_FULL enabled, and the KVM guest running with idle=poll mode, we still get wakeups of the rcuos/N threads.

This problem has already been solved for user space by telling the RCU subsystem that the CPU is in an extended quiescent state while running user space code.

This patch series extends that code a little bit to make it usable to track KVM guest space, too.

I tested the code by booting a KVM guest with idle=poll, on a system with NOHZ_FULL enabled on most CPUs, and a VCPU thread bound to a CPU. In a 10 second interval, rcuos/N threads on other CPUs got woken up several times, while the rcuos thread on the CPU running the bound and alwasy running VCPU thread never got woken up once.

Thanks to Christian Borntraeger and Paul McKenney for reviewing the first version of this patch series, and helping optimize patch 4/5.