[PATCH v5 0/2] Replaced locks with lock guard macros

dnbrdsky@gmail.com posted 2 patches 4 years, 1 month ago
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test checkpatch passed
Test FreeBSD passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200404042108.389635-1-dnbrdsky@gmail.com
Maintainers: Peter Lieven <pl@kamp.de>, Alex Williamson <alex.williamson@redhat.com>, Ronnie Sahlberg <ronniesahlberg@gmail.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Juan Quintela <quintela@redhat.com>, Max Reitz <mreitz@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Markus Armbruster <armbru@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
block/iscsi.c           |  7 ++----
block/nfs.c             | 51 +++++++++++++++++++----------------------
cpus-common.c           | 14 ++++-------
hw/display/qxl.c        | 43 ++++++++++++++++------------------
hw/vfio/platform.c      |  5 ++--
include/qemu/lockable.h |  7 +++---
include/qemu/rcu.h      |  2 +-
migration/migration.c   |  3 +--
migration/multifd.c     |  8 +++----
migration/ram.c         |  3 +--
monitor/misc.c          |  4 +---
ui/spice-display.c      | 14 +++++------
util/log.c              |  4 ++--
util/qemu-timer.c       | 17 +++++++-------
util/rcu.c              |  8 +++----
util/thread-pool.c      |  3 +--
util/vfio-helpers.c     |  5 ++--
17 files changed, 88 insertions(+), 110 deletions(-)
[PATCH v5 0/2] Replaced locks with lock guard macros
Posted by dnbrdsky@gmail.com 4 years, 1 month ago
From: Daniel Brodsky <dnbrdsky@gmail.com>

This patch set adds:
- a fix for lock guard macros so they can be used multiple times in
the same function
- replacement of locks with lock guards where appropriate

v4 -> v5:
- added G_GNUC_UNUSED to lock guard macro to supress unused var warning

v3 -> v4:
- removed unneeded unlocks from areas where lock guards are now used
- dropped change to lock guard in iscsi.c as it changed old functionality

v2 -> v3:
- added __COUNTER__ fix for additional lock guard macro
- added missing include header in platform.c

v1 -> v2:
- fixed whitespace churn
- added cover letter so patch set referenced correctly

Daniel Brodsky (2):
  lockable: fix __COUNTER__ macro to be referenced properly
  lockable: replaced locks with lock guard macros where appropriate

 block/iscsi.c           |  7 ++----
 block/nfs.c             | 51 +++++++++++++++++++----------------------
 cpus-common.c           | 14 ++++-------
 hw/display/qxl.c        | 43 ++++++++++++++++------------------
 hw/vfio/platform.c      |  5 ++--
 include/qemu/lockable.h |  7 +++---
 include/qemu/rcu.h      |  2 +-
 migration/migration.c   |  3 +--
 migration/multifd.c     |  8 +++----
 migration/ram.c         |  3 +--
 monitor/misc.c          |  4 +---
 ui/spice-display.c      | 14 +++++------
 util/log.c              |  4 ++--
 util/qemu-timer.c       | 17 +++++++-------
 util/rcu.c              |  8 +++----
 util/thread-pool.c      |  3 +--
 util/vfio-helpers.c     |  5 ++--
 17 files changed, 88 insertions(+), 110 deletions(-)

-- 
2.26.0


Re: [PATCH v5 0/2] Replaced locks with lock guard macros
Posted by Stefan Hajnoczi 4 years ago
On Fri, Apr 03, 2020 at 09:21:06PM -0700, dnbrdsky@gmail.com wrote:
> From: Daniel Brodsky <dnbrdsky@gmail.com>
> 
> This patch set adds:
> - a fix for lock guard macros so they can be used multiple times in
> the same function
> - replacement of locks with lock guards where appropriate
> 
> v4 -> v5:
> - added G_GNUC_UNUSED to lock guard macro to supress unused var warning
> 
> v3 -> v4:
> - removed unneeded unlocks from areas where lock guards are now used
> - dropped change to lock guard in iscsi.c as it changed old functionality
> 
> v2 -> v3:
> - added __COUNTER__ fix for additional lock guard macro
> - added missing include header in platform.c
> 
> v1 -> v2:
> - fixed whitespace churn
> - added cover letter so patch set referenced correctly
> 
> Daniel Brodsky (2):
>   lockable: fix __COUNTER__ macro to be referenced properly
>   lockable: replaced locks with lock guard macros where appropriate
> 
>  block/iscsi.c           |  7 ++----
>  block/nfs.c             | 51 +++++++++++++++++++----------------------
>  cpus-common.c           | 14 ++++-------
>  hw/display/qxl.c        | 43 ++++++++++++++++------------------
>  hw/vfio/platform.c      |  5 ++--
>  include/qemu/lockable.h |  7 +++---
>  include/qemu/rcu.h      |  2 +-
>  migration/migration.c   |  3 +--
>  migration/multifd.c     |  8 +++----
>  migration/ram.c         |  3 +--
>  monitor/misc.c          |  4 +---
>  ui/spice-display.c      | 14 +++++------
>  util/log.c              |  4 ++--
>  util/qemu-timer.c       | 17 +++++++-------
>  util/rcu.c              |  8 +++----
>  util/thread-pool.c      |  3 +--
>  util/vfio-helpers.c     |  5 ++--
>  17 files changed, 88 insertions(+), 110 deletions(-)

Paolo, hope you don't mind if I use the block-next branch to merge this
and Simran's patch that depends on it.

Thanks, applied to my block-next tree:
https://github.com/stefanha/qemu/commits/block-next

Stefan
Re: [PATCH v5 0/2] Replaced locks with lock guard macros
Posted by Paolo Bonzini 4 years ago
On 24/04/20 12:50, Stefan Hajnoczi wrote:
> Paolo, hope you don't mind if I use the block-next branch to merge this
> and Simran's patch that depends on it.

Absolutely not, thanks.

Paolo

> Thanks, applied to my block-next tree:
> https://github.com/stefanha/qemu/commits/block-next