[Qemu-devel] [PATCH v2 0/5] Automatic RCU read unlock

Dr. David Alan Gilbert (git) posted 5 patches 4 years, 7 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
exec.c                  | 46 ++++++++++-----------------------
include/exec/ram_addr.h |  8 ++----
include/qemu/rcu.h      | 18 +++++++++++++
memory.c                | 15 ++++-------
migration/ram.c         | 26 ++++++++-----------
migration/rdma.c        | 57 ++++++++---------------------------------
6 files changed, 60 insertions(+), 110 deletions(-)
[Qemu-devel] [PATCH v2 0/5] Automatic RCU read unlock
Posted by Dr. David Alan Gilbert (git) 4 years, 7 months ago
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>


This patch uses glib's g_auto mechanism to automatically free
rcu_read_lock's at the end of the block.  Given that humans
have a habit of forgetting an error path somewhere it's
best to leave it to the compiler.

(Note I've found the actual cause of my deadlock actually
isn't a misisng unlock; it's a lock ordering thing)

v2
  Rework auto mechanism based on Dan and Eduardo's comments
  Add some more uses in memory/exec
  Add a missing unlock in a function I've not used the macro in

Dr. David Alan Gilbert (5):
  rcu: Add automatically released rcu_read_lock variant
  migration: Use automatic rcu_read unlock in ram.c
  migration: Use automatic rcu_read unlock in rdma.c
  rcu: Use automatic rc_read unlock in core memory/exec code
  migration: Missing rcu_read_unlock

 exec.c                  | 46 ++++++++++-----------------------
 include/exec/ram_addr.h |  8 ++----
 include/qemu/rcu.h      | 18 +++++++++++++
 memory.c                | 15 ++++-------
 migration/ram.c         | 26 ++++++++-----------
 migration/rdma.c        | 57 ++++++++---------------------------------
 6 files changed, 60 insertions(+), 110 deletions(-)

-- 
2.21.0