[Qemu-devel] [PATCH 0/4] Optionally use membarrier system call for RCU

Paolo Bonzini posted 4 patches 7 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180309132922.24211-1-pbonzini@redhat.com
Test checkpatch failed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test docker-quick@centos6 passed
Test ppcbe passed
Test ppcle passed
Test s390x passed
configure                     | 41 ++++++++++++++++++++++++++++++++++-
include/qemu/rcu.h            | 16 ++++++++++++--
include/qemu/sys_membarrier.h | 27 +++++++++++++++++++++++
tests/rcutorture.c            |  4 ---
util/Makefile.objs            |  1 +
util/rcu.c                    | 15 +++++++++----
util/sys_membarrier.c         | 50 +++++++++++++++++++++++++++++++++++++++++++
7 files changed, 143 insertions(+), 11 deletions(-)
create mode 100644 include/qemu/sys_membarrier.h
create mode 100644 util/sys_membarrier.c
[Qemu-devel] [PATCH 0/4] Optionally use membarrier system call for RCU
Posted by Paolo Bonzini 7 years, 7 months ago
I didn't have time to check whether it improves performance (not
too likely, since QEMU tends to have pretty long RCU critical
sections), but it cannot hurt either. :)

For microbenchmark results, see patch 4.

Paolo


Paolo Bonzini (4):
  rcutorture: remove synchronize_rcu from readers
  rcu: make memory barriers more explicit
  membarrier: introduce qemu/sys_membarrier.h
  membarrier: add --enable-membarrier

 configure                     | 41 ++++++++++++++++++++++++++++++++++-
 include/qemu/rcu.h            | 16 ++++++++++++--
 include/qemu/sys_membarrier.h | 27 +++++++++++++++++++++++
 tests/rcutorture.c            |  4 ---
 util/Makefile.objs            |  1 +
 util/rcu.c                    | 15 +++++++++----
 util/sys_membarrier.c         | 50 +++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 143 insertions(+), 11 deletions(-)
 create mode 100644 include/qemu/sys_membarrier.h
 create mode 100644 util/sys_membarrier.c

-- 
2.14.3


Re: [Qemu-devel] [PATCH 0/4] Optionally use membarrier system call for RCU
Posted by no-reply@patchew.org 7 years, 7 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20180309132922.24211-1-pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH 0/4] Optionally use membarrier system call for RCU

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/20180309132922.24211-1-pbonzini@redhat.com -> patchew/20180309132922.24211-1-pbonzini@redhat.com
Switched to a new branch 'test'
2912d721ce membarrier: add --enable-membarrier
5f0f5753cc membarrier: introduce qemu/sys_membarrier.h
8acb0ecf90 rcu: make memory barriers more explicit
7c506b9d5d rcutorture: remove synchronize_rcu from readers

=== OUTPUT BEGIN ===
Checking PATCH 1/4: rcutorture: remove synchronize_rcu from readers...
Checking PATCH 2/4: rcu: make memory barriers more explicit...
Checking PATCH 3/4: membarrier: introduce qemu/sys_membarrier.h...
ERROR: memory barrier without comment
#70: FILE: include/qemu/sys_membarrier.h:14:
+#define smp_mb_global()            smp_mb()

ERROR: memory barrier without comment
#71: FILE: include/qemu/sys_membarrier.h:15:
+#define smp_mb_placeholder()       smp_mb()

total: 2 errors, 0 warnings, 77 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 4/4: membarrier: add --enable-membarrier...
WARNING: line over 80 characters
#190: FILE: util/sys_membarrier.c:45:
+        error_report("This QEMU binary requires MEMBARRIER_CMD_SHARED support.");

total: 0 errors, 1 warnings, 152 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
Re: [Qemu-devel] [PATCH 0/4] Optionally use membarrier system call for RCU
Posted by Emilio G. Cota 7 years, 7 months ago
On Fri, Mar 09, 2018 at 14:29:18 +0100, Paolo Bonzini wrote:
> I didn't have time to check whether it improves performance (not
> too likely, since QEMU tends to have pretty long RCU critical
> sections), but it cannot hurt either. :)

Sorry it took me more than a week to go through this, I was busy
working on the FP patchset.

I see this set is already on master; nonetheless here are some
minor comments.

		E.