qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] e2f07e: qht: remove unused map param from qht


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] e2f07e: qht: remove unused map param from qht_remove__lock...
Date: Mon, 01 Oct 2018 01:18:18 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: e2f07efadd15c045bca42661c07b0557c8250e24
      
https://github.com/qemu/qemu/commit/e2f07efadd15c045bca42661c07b0557c8250e24
  Author: Emilio G. Cota <address@hidden>
  Date:   2018-09-26 (Wed, 26 Sep 2018)

  Changed paths:
    M util/qht.c

  Log Message:
  -----------
  qht: remove unused map param from qht_remove__locked

Reviewed-by: Alex Bennée <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: 69d55e9cc28dc2f1e2f2426d2a43f2d10db76f29
      
https://github.com/qemu/qemu/commit/69d55e9cc28dc2f1e2f2426d2a43f2d10db76f29
  Author: Emilio G. Cota <address@hidden>
  Date:   2018-09-26 (Wed, 26 Sep 2018)

  Changed paths:
    M include/qemu/qht.h
    M util/qht.c

  Log Message:
  -----------
  qht: add qht_iter_remove

This currently has no users, but the use case is so common that I
think we must support it.

Note that without the appended we cannot safely remove a set of
elements; a 2-step approach (i.e. qht_iter first, keep track of
the to-be-deleted elements, and then a bunch of qht_remove calls)
would be racy, since between the iteration and the removals other
threads might insert additional elements.

Reviewed-by: Alex Bennée <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: 922034e776420082e89c0f7679cb1568086a1071
      
https://github.com/qemu/qemu/commit/922034e776420082e89c0f7679cb1568086a1071
  Author: Emilio G. Cota <address@hidden>
  Date:   2018-09-26 (Wed, 26 Sep 2018)

  Changed paths:
    M tests/test-qht.c

  Log Message:
  -----------
  test-qht: test qht_iter_remove

Reviewed-by: Alex Bennée <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: f44641bbf2dc9a2849d17797b2d342d1af853712
      
https://github.com/qemu/qemu/commit/f44641bbf2dc9a2849d17797b2d342d1af853712
  Author: Emilio G. Cota <address@hidden>
  Date:   2018-09-26 (Wed, 26 Sep 2018)

  Changed paths:
    M tests/test-qht.c

  Log Message:
  -----------
  test-qht: test removal of non-existent entries

This improves qht.c code coverage from 89.44% to 90.00%.

Reviewed-by: Alex Bennée <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: 321a33f534eb0285f483a2db5f4b47442adadd87
      
https://github.com/qemu/qemu/commit/321a33f534eb0285f483a2db5f4b47442adadd87
  Author: Emilio G. Cota <address@hidden>
  Date:   2018-09-26 (Wed, 26 Sep 2018)

  Changed paths:
    M tests/test-qht.c

  Log Message:
  -----------
  test-qht: test deletion of the last entry in a bucket

This improves coverage by one (!) LoC in qht.c, bringing the
coverage rate up from 90.00% to 90.28%.

Reviewed-by: Alex Bennée <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: ca8897a44cda60693e66085f1e916e76b94400df
      
https://github.com/qemu/qemu/commit/ca8897a44cda60693e66085f1e916e76b94400df
  Author: Emilio G. Cota <address@hidden>
  Date:   2018-09-26 (Wed, 26 Sep 2018)

  Changed paths:
    M tests/test-qht.c

  Log Message:
  -----------
  test-qht: speed up + test qht_resize

Perform first the tests that exercise code paths that are
easier to hit at small table sizes, and then resize the table
to speed up subsequent tests. If this resize is not too large,
we can make the test faster with no code coverage loss.

- With gcov enabled:

Before: 20.568s, 90.28% qht.c coverage
After:   5.168s, 93.06% qht.c coverage

The coverage increase is entirely due to calling qht_resize,
which we weren't calling before. Note that the code paths
that remain to be tested are either error handling or
can only occur when several threads are accessing the
hash table concurrently (e.g. seqlock retry, trylock fail).

- Without gcov:

Before: 1.987s
After:  0.528s

The speedup is almost the same as with gcov, although the
"before" run is a lot faster.

Reviewed-by: Alex Bennée <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: 78255ba2cc00f41d96aa2911933764f59f24c958
      
https://github.com/qemu/qemu/commit/78255ba2cc00f41d96aa2911933764f59f24c958
  Author: Emilio G. Cota <address@hidden>
  Date:   2018-09-26 (Wed, 26 Sep 2018)

  Changed paths:
    M accel/tcg/translate-all.c
    M include/qemu/qht.h
    M tests/test-qht.c
    M util/qht.c
    M util/qsp.c

  Log Message:
  -----------
  qht: drop ht argument from qht iterators

Accessing the HT from an iterator results almost always
in a deadlock. Given that only one qht-internal function
uses this argument, drop it from the interface.

Suggested-by: Alex Bennée <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: 9650ad3e9924ec98a42c6448292e2442e0c58457
      
https://github.com/qemu/qemu/commit/9650ad3e9924ec98a42c6448292e2442e0c58457
  Author: Emilio G. Cota <address@hidden>
  Date:   2018-09-26 (Wed, 26 Sep 2018)

  Changed paths:
    M util/qht.c

  Log Message:
  -----------
  qht: fix comment in qht_bucket_remove_entry

Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: e6c58299502fb94e329b7a35a12feacde6c1cbc6
      
https://github.com/qemu/qemu/commit/e6c58299502fb94e329b7a35a12feacde6c1cbc6
  Author: Emilio G. Cota <address@hidden>
  Date:   2018-09-26 (Wed, 26 Sep 2018)

  Changed paths:
    M include/qemu/qht.h
    M util/qht.c

  Log Message:
  -----------
  qht: constify qht_lookup

seqlock_read_begin takes a const param since c04649eeea
("seqlock: constify seqlock_read_begin", 2018-08-23), so
we can constify the entire lookup.

Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: 6579f10779b5b5ed2e978e7b8cae7bcbf8665254
      
https://github.com/qemu/qemu/commit/6579f10779b5b5ed2e978e7b8cae7bcbf8665254
  Author: Emilio G. Cota <address@hidden>
  Date:   2018-09-26 (Wed, 26 Sep 2018)

  Changed paths:
    M include/qemu/qht.h
    M util/qht.c

  Log Message:
  -----------
  qht: constify qht_statistics_init

Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: 1911c8a3bd550c79339863672ddcf5dbc48d3c16
      
https://github.com/qemu/qemu/commit/1911c8a3bd550c79339863672ddcf5dbc48d3c16
  Author: Emilio G. Cota <address@hidden>
  Date:   2018-09-26 (Wed, 26 Sep 2018)

  Changed paths:
    M util/qht.c

  Log Message:
  -----------
  qht: constify arguments to some internal functions

These functions do not modify their @ht or @bucket arguments.
Constify those arguments.

Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: bd224fce6017133733fee560ad8e5f737ad8b062
      
https://github.com/qemu/qemu/commit/bd224fce6017133733fee560ad8e5f737ad8b062
  Author: Emilio G. Cota <address@hidden>
  Date:   2018-09-26 (Wed, 26 Sep 2018)

  Changed paths:
    M tests/qht-bench.c

  Log Message:
  -----------
  qht-bench: add -p flag to precompute hash values

Precomputing the hash values allows us to perform more frequent
accesses to the hash table, thereby reaching higher throughputs.

We keep the old behaviour by default, since (1) we might confuse
users if they measured a speedup without changing anything in
the QHT implementation, and (2) benchmarking the hash function
"on line" is also valuable.

Before:
$ taskset -c 0 tests/qht-bench -n 1
 Throughput:        38.18 MT/s

After:
$ taskset -c 0 tests/qht-bench -n 1
 Throughput:        38.16 MT/s

After (with precomputing):
$ taskset -c 0 tests/qht-bench -n 1 -p
 Throughput:        50.87 MT/s

Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: 93bf9a42733321fb632bcb9eafd049ef0e3d9417
      
https://github.com/qemu/qemu/commit/93bf9a42733321fb632bcb9eafd049ef0e3d9417
  Author: Roman Kapl <address@hidden>
  Date:   2018-09-26 (Wed, 26 Sep 2018)

  Changed paths:
    M tcg/i386/tcg-target.inc.c

  Log Message:
  -----------
  tcg/i386: fix vector operations on 32-bit hosts

The TCG backend uses LOWREGMASK to get the low 3 bits of register numbers.
This was defined as no-op for 32-bit x86, with the assumption that we have
eight registers anyway. This assumption is not true once we have xmm regs.

Since LOWREGMASK was a no-op, xmm register indidices were wrong in opcodes
and have overflown into other opcode fields, wreaking havoc.

To trigger these problems, you can try running the "movi d8, #0x0" AArch64
instruction on 32-bit x86. "vpxor %xmm0, %xmm0, %xmm0" should be generated,
but instead TCG generated "vpxor %xmm0, %xmm0, %xmm2".

Fixes: 770c2fc7bb ("Add vector operations")
Signed-off-by: Roman Kapl <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: 07f426c35eddd79388a23d11cb278600d7e3831d
      
https://github.com/qemu/qemu/commit/07f426c35eddd79388a23d11cb278600d7e3831d
  Author: Peter Maydell <address@hidden>
  Date:   2018-09-28 (Fri, 28 Sep 2018)

  Changed paths:
    M accel/tcg/translate-all.c
    M include/qemu/qht.h
    M tcg/i386/tcg-target.inc.c
    M tests/qht-bench.c
    M tests/test-qht.c
    M util/qht.c
    M util/qsp.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20180926' into staging

Queued tcg patches

# gpg: Signature made Wed 26 Sep 2018 19:27:22 BST
# gpg:                using RSA key 64DF38E8AF7E215F
# gpg: Good signature from "Richard Henderson <address@hidden>"
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* remotes/rth/tags/pull-tcg-20180926:
  tcg/i386: fix vector operations on 32-bit hosts
  qht-bench: add -p flag to precompute hash values
  qht: constify arguments to some internal functions
  qht: constify qht_statistics_init
  qht: constify qht_lookup
  qht: fix comment in qht_bucket_remove_entry
  qht: drop ht argument from qht iterators
  test-qht: speed up + test qht_resize
  test-qht: test deletion of the last entry in a bucket
  test-qht: test removal of non-existent entries
  test-qht: test qht_iter_remove
  qht: add qht_iter_remove
  qht: remove unused map param from qht_remove__locked

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/042938f46e1c...07f426c35edd
      **NOTE:** This service has been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]