[Qemu-devel] [PATCH v3 00/18] Block layer thread safety, part 1

Paolo Bonzini posted 18 patches 6 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170525163225.29954-1-pbonzini@redhat.com
Test checkpatch failed
Test docker passed
Test s390x passed
There is a newer version of this series
block.c                        |   9 +-
block/accounting.c             |  65 ++++++++------
block/block-backend.c          |   5 +-
block/dirty-bitmap.c           | 112 ++++++++++++++++++++++--
block/io.c                     |  51 ++++++-----
block/mirror.c                 |  14 ++-
block/nfs.c                    |   4 +-
block/qapi.c                   |   2 +-
block/sheepdog.c               |   3 +-
block/throttle-groups.c        |  91 ++++++++++++++-----
blockdev.c                     |  46 ++--------
include/block/accounting.h     |   8 +-
include/block/block.h          |   5 +-
include/block/block_int.h      |  61 ++++++++-----
include/block/dirty-bitmap.h   |  25 ++++--
include/qemu/stats64.h         | 193 +++++++++++++++++++++++++++++++++++++++++
include/sysemu/block-backend.h |  10 +--
migration/block.c              |  17 ++--
util/Makefile.objs             |   1 +
util/stats64.c                 | 136 +++++++++++++++++++++++++++++
20 files changed, 680 insertions(+), 178 deletions(-)
create mode 100644 include/qemu/stats64.h
create mode 100644 util/stats64.c
[Qemu-devel] [PATCH v3 00/18] Block layer thread safety, part 1
Posted by Paolo Bonzini 6 years, 10 months ago
Minimal changes to:
- fix compilation (patch 10)
- appease checkpatch (patch 17)
- rename mutex field from "spin" to "lock" (patch 18)

Paolo

Paolo Bonzini (18):
  block: access copy_on_read with atomic ops
  block: access quiesce_counter with atomic ops
  block: access io_limits_disabled with atomic ops
  block: access serialising_in_flight with atomic ops
  block: access wakeup with atomic ops
  block: access io_plugged with atomic ops
  throttle-groups: only start one coroutine from drained_begin
  throttle-groups: do not use qemu_co_enter_next
  throttle-groups: protect throttled requests with a CoMutex
  util: add stats64 module
  block: use Stat64 for wr_highest_offset
  block: access write_gen with atomics
  block: protect tracked_requests and flush_queue with reqs_lock
  block: introduce dirty_bitmap_mutex
  migration/block: reset dirty bitmap before reading
  block: protect modification of dirty bitmaps with a mutex
  block: introduce block_account_one_io
  block: make accounting thread-safe

 block.c                        |   9 +-
 block/accounting.c             |  65 ++++++++------
 block/block-backend.c          |   5 +-
 block/dirty-bitmap.c           | 112 ++++++++++++++++++++++--
 block/io.c                     |  51 ++++++-----
 block/mirror.c                 |  14 ++-
 block/nfs.c                    |   4 +-
 block/qapi.c                   |   2 +-
 block/sheepdog.c               |   3 +-
 block/throttle-groups.c        |  91 ++++++++++++++-----
 blockdev.c                     |  46 ++--------
 include/block/accounting.h     |   8 +-
 include/block/block.h          |   5 +-
 include/block/block_int.h      |  61 ++++++++-----
 include/block/dirty-bitmap.h   |  25 ++++--
 include/qemu/stats64.h         | 193 +++++++++++++++++++++++++++++++++++++++++
 include/sysemu/block-backend.h |  10 +--
 migration/block.c              |  17 ++--
 util/Makefile.objs             |   1 +
 util/stats64.c                 | 136 +++++++++++++++++++++++++++++
 20 files changed, 680 insertions(+), 178 deletions(-)
 create mode 100644 include/qemu/stats64.h
 create mode 100644 util/stats64.c

-- 
1.8.3.1


Re: [Qemu-devel] [PATCH v3 00/18] Block layer thread safety, part 1
Posted by no-reply@patchew.org 6 years, 10 months ago
Hi,

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

Message-id: 20170525163225.29954-1-pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH v3 00/18] Block layer thread safety, part 1
Type: series

=== 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

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/20170525163851.8047-1-berrange@redhat.com -> patchew/20170525163851.8047-1-berrange@redhat.com
Switched to a new branch 'test'
e9f6b2e block: make accounting thread-safe
87db667 block: introduce block_account_one_io
b7dcbdf block: protect modification of dirty bitmaps with a mutex
cdd94ba migration/block: reset dirty bitmap before reading
22d8d10 block: introduce dirty_bitmap_mutex
e69b91d block: protect tracked_requests and flush_queue with reqs_lock
c52a708 block: access write_gen with atomics
45aa0b3 block: use Stat64 for wr_highest_offset
9d22d4d util: add stats64 module
381e26b throttle-groups: protect throttled requests with a CoMutex
d457aab throttle-groups: do not use qemu_co_enter_next
cc161ed throttle-groups: only start one coroutine from drained_begin
a5b7ffb block: access io_plugged with atomic ops
6aae747 block: access wakeup with atomic ops
641a9b4 block: access serialising_in_flight with atomic ops
6b1e687 block: access io_limits_disabled with atomic ops
4f11fb0 block: access quiesce_counter with atomic ops
6831428 block: access copy_on_read with atomic ops

=== OUTPUT BEGIN ===
Checking PATCH 1/18: block: access copy_on_read with atomic ops...
Checking PATCH 2/18: block: access quiesce_counter with atomic ops...
Checking PATCH 3/18: block: access io_limits_disabled with atomic ops...
Checking PATCH 4/18: block: access serialising_in_flight with atomic ops...
Checking PATCH 5/18: block: access wakeup with atomic ops...
Checking PATCH 6/18: block: access io_plugged with atomic ops...
Checking PATCH 7/18: throttle-groups: only start one coroutine from drained_begin...
Checking PATCH 8/18: throttle-groups: do not use qemu_co_enter_next...
Checking PATCH 9/18: throttle-groups: protect throttled requests with a CoMutex...
Checking PATCH 10/18: util: add stats64 module...
ERROR: memory barrier without comment
#328: FILE: util/stats64.c:101:
+        smp_wmb();

ERROR: memory barrier without comment
#357: FILE: util/stats64.c:130:
+        smp_wmb();

total: 2 errors, 0 warnings, 334 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 11/18: block: use Stat64 for wr_highest_offset...
Checking PATCH 12/18: block: access write_gen with atomics...
Checking PATCH 13/18: block: protect tracked_requests and flush_queue with reqs_lock...
Checking PATCH 14/18: block: introduce dirty_bitmap_mutex...
Checking PATCH 15/18: migration/block: reset dirty bitmap before reading...
Checking PATCH 16/18: block: protect modification of dirty bitmaps with a mutex...
WARNING: line over 80 characters
#304: FILE: migration/block.c:539:
+            bdrv_reset_dirty_bitmap_locked(bmds->dirty_bitmap, sector, nr_sectors);

total: 0 errors, 1 warnings, 272 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 17/18: block: introduce block_account_one_io...
Checking PATCH 18/18: block: make accounting thread-safe...
=== 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 v3 00/18] Block layer thread safety, part 1
Posted by Fam Zheng 6 years, 10 months ago
On Thu, 05/25 18:32, Paolo Bonzini wrote:
> Minimal changes to:
> - fix compilation (patch 10)
> - appease checkpatch (patch 17)
> - rename mutex field from "spin" to "lock" (patch 18)

Thanks, queued.

Fam