mbox series

[v2,00/17] tcg: tb_lock_removal redux v2

Message ID 1522980788-1252-1-git-send-email-cota@braap.org
Headers show
Series tcg: tb_lock_removal redux v2 | expand

Message

Emilio Cota April 6, 2018, 2:12 a.m. UTC
v1: http://lists.gnu.org/archive/html/qemu-devel/2018-02/msg06499.html

Changes since v1:

- Add R-b's

- Rebase onto master

- qht_lookup_custom: move @func to be the last argument, which
  simplifies the new qht_lookup function. (I've kept R-b's tags
  here because this is a very simple change.)

- qht_insert: add an **existing argument and keep the bool return value,
  as suggested by Alex.

- Fix indentation of TB_FOR_EACH_TAGGED macro

- Add page_locked assertions, as suggested by Alex.

- Expand comment in tb_link_page and in docs/mttcg about parallel
  code insertion.

- Fix stale comment about tb_lock next to CF_INVALID

- Fix stale comment in cpu_restore_state, as suggested by Alex.

There is only one checkpatch error for the entire series -- it is
a false positive.

You can fetch the tree from:
  https://github.com/cota/qemu/tree/tb-lock-removal-redux-v2

Thanks,

		Emilio
---
 accel/tcg/cpu-exec.c            |   96 ++-
 accel/tcg/cputlb.c              |    8 -
 accel/tcg/translate-all.c       | 1053 ++++++++++++++++++++++----------
 accel/tcg/translate-all.h       |    6 +-
 docs/devel/multi-thread-tcg.txt |   24 +-
 exec.c                          |   25 +-
 include/exec/cpu-common.h       |    2 +-
 include/exec/exec-all.h         |   51 +-
 include/exec/memory-internal.h  |    6 +-
 include/exec/tb-context.h       |    4 -
 include/qemu/qht.h              |   32 +-
 linux-user/main.c               |    3 -
 tcg/tcg.c                       |  205 +++++++
 tcg/tcg.h                       |   13 +-
 tests/qht-bench.c               |   18 +-
 tests/test-qht.c                |   23 +-
 util/qht.c                      |   41 +-
 17 files changed, 1133 insertions(+), 477 deletions(-)

Comments

no-reply@patchew.org April 6, 2018, 2:32 a.m. UTC | #1
Hi,

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

Type: series
Message-id: 1522980788-1252-1-git-send-email-cota@braap.org
Subject: [Qemu-devel] [PATCH v2 00/17] tcg: tb_lock_removal redux v2

=== 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/1522980788-1252-1-git-send-email-cota@braap.org -> patchew/1522980788-1252-1-git-send-email-cota@braap.org
Switched to a new branch 'test'
596b0ae126 tcg: remove tb_lock
393740f4bc translate-all: remove tb_lock mention from cpu_restore_state_from_tb
1d225d49e8 cputlb: remove tb_lock from tlb_flush functions
7117367de6 translate-all: protect TB jumps with a per-destination-TB lock
1d1fd21dd7 translate-all: discard TB when tb_link_page returns an existing matching TB
ca22fa4417 translate-all: add page_collection assertions
50b6081956 translate-all: add page_locked assertions
5b6d7dd39f translate-all: use per-page locking in !user-mode
9fb729b4a1 translate-all: move tb_invalidate_phys_page_range up in the file
e3435070c4 translate-all: work page-by-page in tb_invalidate_phys_range_1
b7f40fb599 translate-all: remove hole in PageDesc
256fc42714 translate-all: make l1_map lockless
9bb165ec14 translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB
8a38ca3168 tcg: move tb_ctx.tb_phys_invalidate_count to tcg_ctx
c0e7a50dea tcg: track TBs with per-region BST's
812e356d97 qht: return existing entry when qht_insert fails
aa639c6e6f qht: require a default comparison function

=== OUTPUT BEGIN ===
Checking PATCH 1/17: qht: require a default comparison function...
Checking PATCH 2/17: qht: return existing entry when qht_insert fails...
Checking PATCH 3/17: tcg: track TBs with per-region BST's...
Checking PATCH 4/17: tcg: move tb_ctx.tb_phys_invalidate_count to tcg_ctx...
Checking PATCH 5/17: translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB...
ERROR: braces {} are necessary for all arms of this statement
#50: FILE: accel/tcg/translate-all.c:119:
+    for (n = (head) & 1, tb = (TranslationBlock *)((head) & ~1);        \
[...]

total: 1 errors, 0 warnings, 168 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 6/17: translate-all: make l1_map lockless...
Checking PATCH 7/17: translate-all: remove hole in PageDesc...
Checking PATCH 8/17: translate-all: work page-by-page in tb_invalidate_phys_range_1...
Checking PATCH 9/17: translate-all: move tb_invalidate_phys_page_range up in the file...
Checking PATCH 10/17: translate-all: use per-page locking in !user-mode...
Checking PATCH 11/17: translate-all: add page_locked assertions...
Checking PATCH 12/17: translate-all: add page_collection assertions...
Checking PATCH 13/17: translate-all: discard TB when tb_link_page returns an existing matching TB...
Checking PATCH 14/17: translate-all: protect TB jumps with a per-destination-TB lock...
Checking PATCH 15/17: cputlb: remove tb_lock from tlb_flush functions...
Checking PATCH 16/17: translate-all: remove tb_lock mention from cpu_restore_state_from_tb...
Checking PATCH 17/17: tcg: remove tb_lock...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Alex Bennée April 20, 2018, 4:17 p.m. UTC | #2
Emilio G. Cota <cota@braap.org> writes:

> v1: http://lists.gnu.org/archive/html/qemu-devel/2018-02/msg06499.html
>
> Changes since v1:
>
<snip>

I was just catching up on reviews but there are a fair few conflicts in
the later patches. I also note you have some comments from Richard to
address. Should I wait until v3?

--
Alex Bennée
Emilio Cota April 20, 2018, 4:50 p.m. UTC | #3
On Fri, Apr 20, 2018 at 17:17:15 +0100, Alex Bennée wrote:
> 
> Emilio G. Cota <cota@braap.org> writes:
> 
> > v1: http://lists.gnu.org/archive/html/qemu-devel/2018-02/msg06499.html
> >
> > Changes since v1:
> >
> <snip>
> 
> I was just catching up on reviews but there are a fair few conflicts in
> the later patches. I also note you have some comments from Richard to
> address. Should I wait until v3?

Yes, please.

Thanks,

		Emilio