[Xen-devel] [PATCH v8 0/5] xen/rcu: let rcu work better with core scheduling

Juergen Gross posted 5 patches 4 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/xen tags/patchew/20200326091918.12388-1-jgross@suse.com
Maintainers: Stefano Stabellini <sstabellini@kernel.org>, Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>, Wei Liu <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>, Ian Jackson <ian.jackson@eu.citrix.com>, Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>, George Dunlap <george.dunlap@citrix.com>, Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/rcupdate.c        | 110 ++++++++++++++++++++++++++++++++-----------
xen/common/softirq.c         |  14 +++++-
xen/include/asm-arm/system.h |   3 ++
xen/include/asm-x86/system.h |   3 ++
xen/include/xen/rcupdate.h   |  77 +++++++++++++++++++++++++-----
5 files changed, 165 insertions(+), 42 deletions(-)
[Xen-devel] [PATCH v8 0/5] xen/rcu: let rcu work better with core scheduling
Posted by Juergen Gross 4 years, 1 month ago
Today the RCU handling in Xen is affecting scheduling in several ways.
It is raising sched softirqs without any real need and it requires
tasklets for rcu_barrier(), which interacts badly with core scheduling.

This small series repairs those issues.

Additionally some ASSERT()s are added for verification of sane rcu
handling. In order to avoid those triggering right away the obvious
violations are fixed. This includes making rcu locking functions type
safe.

Changes in V8:
- fine tuning of barriers in patch 2

Changes in V7:
- new patch 1
- added some barriers in patch 1

Changes in V6:
- added memory barrier in patch 1
- drop cpu_map_lock only at the end of rcu_barrier()
- re-add prempt_disable() in patch 3

Changes in V5:
- dropped already committed patches 1 and 4
- fixed race
- rework blocking of rcu processing with held rcu locks

Changes in V4:
- patch 5: use barrier()

Changes in V3:
- type safe locking functions (functions instead of macros)
- per-lock debug additions
- new patches 4 and 6
- fixed races

Changes in V2:
- use get_cpu_maps() in rcu_barrier() handling
- avoid recursion in rcu_barrier() handling
- new patches 3 and 4

Juergen Gross (5):
  xen: introduce smp_mb__[after|before]_atomic() barriers
  xen/rcu: don't use stop_machine_run() for rcu_barrier()
  xen: don't process rcu callbacks when holding a rcu_read_lock()
  xen/rcu: add assertions to debug build
  xen/rcu: add per-lock counter in debug builds

 xen/common/rcupdate.c        | 110 ++++++++++++++++++++++++++++++++-----------
 xen/common/softirq.c         |  14 +++++-
 xen/include/asm-arm/system.h |   3 ++
 xen/include/asm-x86/system.h |   3 ++
 xen/include/xen/rcupdate.h   |  77 +++++++++++++++++++++++++-----
 5 files changed, 165 insertions(+), 42 deletions(-)

-- 
2.16.4