{"push_id":1159441832,"size":81,"distinct_size":81,"ref":"refs/heads/master","head":"49237b856ae58ee7955be0b959c504c51b014f20","before":"a93c1bdf0bd4689287094ddb2aae3dc907da3535","commits":[{"sha":"911a4d2215b05267b16925503218f49d607c6b29","author":{"name":"Emilio G. Cota","email":"2ef58f7968325b2e7ec839e83a175e093b7d2b07@braap.org"},"message":"compiler.h: add QEMU_ALIGNED() to enforce struct alignment\n\nReviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org>\nReviewed-by: Richard Henderson <rth@twiddle.net>\nReviewed-by: Alex Bennée <alex.bennee@linaro.org>\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-2-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/911a4d2215b05267b16925503218f49d607c6b29"},{"sha":"ccdb3c1fc8865cf9142235b00e3a8fe3246f2a59","author":{"name":"Emilio G. Cota","email":"2ef58f7968325b2e7ec839e83a175e093b7d2b07@braap.org"},"message":"seqlock: remove optional mutex\n\nThis option is unused; besides, it bloats the struct when not needed.\nLet's just let writers define their own locks elsewhere.\n\nReviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org>\nReviewed-by: Alex Bennée <alex.bennee@linaro.org>\nReviewed-by: Richard Henderson <rth@twiddle.net>\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-3-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/ccdb3c1fc8865cf9142235b00e3a8fe3246f2a59"},{"sha":"03719e44b6d6d559c506808e5b6c340feff867b8","author":{"name":"Emilio G. Cota","email":"2ef58f7968325b2e7ec839e83a175e093b7d2b07@braap.org"},"message":"seqlock: rename write_lock/unlock to write_begin/end\n\nIt is a more appropriate name, now that the mutex embedded\nin the seqlock is gone.\n\nReviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org>\nReviewed-by: Alex Bennée <alex.bennee@linaro.org>\nReviewed-by: Richard Henderson <rth@twiddle.net>\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-4-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/03719e44b6d6d559c506808e5b6c340feff867b8"},{"sha":"462cda505f304c3915e5e30429cee22418f5a6ea","author":{"name":"Emilio G. Cota","email":"2ef58f7968325b2e7ec839e83a175e093b7d2b07@braap.org"},"message":"include/processor.h: define cpu_relax()\n\nTaken from the linux kernel.\n\nReviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org>\nReviewed-by: Richard Henderson <rth@twiddle.net>\nReviewed-by: Alex Bennée <alex.bennee@linaro.org>\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-5-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/462cda505f304c3915e5e30429cee22418f5a6ea"},{"sha":"ac9a9eba1e43c5354905c0c7f8e17852ed396ac2","author":{"name":"Guillaume Delbergue","email":"94a797498ab7e31536bc4a0ab1e88923ca282e27@greensocs.com"},"message":"qemu-thread: add simple test-and-set spinlock\n\nReviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org>\nSigned-off-by: Guillaume Delbergue <guillaume.delbergue@greensocs.com>\n[Rewritten. - Paolo]\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\n[Emilio's additions: use TAS instead of atomic_xchg; emit acquire/release\n barriers; return bool from trylock; call cpu_relax() while spinning;\n optimize for uncontended locks by acquiring the lock with TAS instead\n of TATAS; add qemu_spin_locked().]\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-6-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/ac9a9eba1e43c5354905c0c7f8e17852ed396ac2"},{"sha":"dc8b295d05ec35a8c032f9abca421772347ba5d4","author":{"name":"Emilio G. Cota","email":"2ef58f7968325b2e7ec839e83a175e093b7d2b07@braap.org"},"message":"exec: add tb_hash_func5, derived from xxhash\n\nThis will be used by upcoming changes for hashing the tb hash.\n\nAdd this into a separate file to include the copyright notice from\nxxhash.\n\nReviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org>\nReviewed-by: Richard Henderson <rth@twiddle.net>\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-7-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/dc8b295d05ec35a8c032f9abca421772347ba5d4"},{"sha":"42bd32287f3a18d823f2258b813824a39ed7c6d9","author":{"name":"Emilio G. Cota","email":"2ef58f7968325b2e7ec839e83a175e093b7d2b07@braap.org"},"message":"tb hash: hash phys_pc, pc, and flags with xxhash\n\nFor some workloads such as arm bootup, tb_phys_hash is performance-critical.\nThe is due to the high frequency of accesses to the hash table, originated\nby (frequent) TLB flushes that wipe out the cpu-private tb_jmp_cache's.\nMore info:\n  https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg05098.html\n\nTo dig further into this I modified an arm image booting debian jessie to\nimmediately shut down after boot. Analysis revealed that quite a bit of time\nis unnecessarily spent in tb_phys_hash: the cause is poor hashing that\nresults in very uneven loading of chains in the hash table's buckets;\nthe longest observed chain had ~550 elements.\n\nThe appended addresses this with two changes:\n\n1) Use xxhash as the hash table's hash function. xxhash is a fast,\n   high-quality hashing function.\n\n2) Feed the hashing function with not just tb_phys, but also pc and flags.\n\nThis improves performance over using just tb_phys for hashing, since that\nresulted in some hash buckets having many TB's, while others getting very few;\nwith these changes, the longest observed chain on a single hash bucket is\nbrought down from ~550 to ~40.\n\nTests show that the other element checked for in tb_find_physical,\ncs_base, is always a match when tb_phys+pc+flags are a match,\nso hashing cs_base is wasteful. It could be that this is an ARM-only\nthing, though. UPDATE:\nOn Tue, Apr 05, 2016 at 08:41:43 -0700, Richard Henderson wrote:\n> The cs_base field is only used by i386 (in 16-bit modes), and sparc (for a TB\n> consisting of only a delay slot).\n> It may well still turn out to be reasonable to ignore cs_base for hashing.\n\nBTW, after this change the hash table should not be called \"tb_hash_phys\"\nanymore; this is addressed later in this series.\n\nThis change gives consistent bootup time improvements. I tested two\nhost machines:\n- Intel Xeon E5-2690: 11.6% less time\n- Intel i7-4790K: 19.2% less time\n\nIncreasing the number of hash buckets yields further improvements. However,\nusing a larger, fixed number of buckets can degrade performance for other\nworkloads that do not translate as many blocks (600K+ for debian-jessie arm\nbootup). This is dealt with later in this series.\n\nReviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org>\nReviewed-by: Richard Henderson <rth@twiddle.net>\nReviewed-by: Alex Bennée <alex.bennee@linaro.org>\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-8-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/42bd32287f3a18d823f2258b813824a39ed7c6d9"},{"sha":"bf3afd5f419a2054bf03d963bdd223fbb27b72d2","author":{"name":"Emilio G. Cota","email":"2ef58f7968325b2e7ec839e83a175e093b7d2b07@braap.org"},"message":"qdist: add module to represent frequency distributions of data\n\nSometimes it is useful to have a quick histogram to represent a certain\ndistribution -- for example, when investigating a performance regression\nin a hash table due to inadequate hashing.\n\nThe appended allows us to easily represent a distribution using Unicode\ncharacters. Further, the data structure keeping track of the distribution\nis so simple that obtaining its values for off-line processing is trivial.\n\nExample, taking the last 10 commits to QEMU:\n\n Characters in commit title  Count\n-----------------------------------\n                         39      1\n                         48      1\n                         53      1\n                         54      2\n                         57      1\n                         61      1\n                         67      1\n                         78      1\n                         80      1\nqdist_init(&dist);\nqdist_inc(&dist, 39);\n[...]\nqdist_inc(&dist, 80);\n\nchar *str = qdist_pr(&dist, 9, QDIST_PR_LABELS);\n// -> [39.0,43.6)▂▂ █▂ ▂ ▄[75.4,80.0]\ng_free(str);\n\nchar *str = qdist_pr(&dist, 4, QDIST_PR_LABELS);\n// -> [39.0,49.2)▁█▁▁[69.8,80.0]\ng_free(str);\n\nReviewed-by: Richard Henderson <rth@twiddle.net>\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-9-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/bf3afd5f419a2054bf03d963bdd223fbb27b72d2"},{"sha":"ff9249b7337df52ff36cd8d35da496f6d9d009b1","author":{"name":"Emilio G. Cota","email":"2ef58f7968325b2e7ec839e83a175e093b7d2b07@braap.org"},"message":"qdist: add test program\n\nAcked-by: Sergey Fedorov <sergey.fedorov@linaro.org>\nReviewed-by: Richard Henderson <rth@twiddle.net>\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-10-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/ff9249b7337df52ff36cd8d35da496f6d9d009b1"},{"sha":"2e11264aafe476c7a53accde4a23cfc2395a02fd","author":{"name":"Emilio G. Cota","email":"2ef58f7968325b2e7ec839e83a175e093b7d2b07@braap.org"},"message":"qht: QEMU's fast, resizable and scalable Hash Table\n\nThis is a fast, scalable chained hash table with optional auto-resizing, allowing\nreads that are concurrent with reads, and reads/writes that are concurrent\nwith writes to separate buckets.\n\nA hash table with these features will be necessary for the scalability\nof the ongoing MTTCG work; before those changes arrive we can already\nbenefit from the single-threaded speedup that qht also provides.\n\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-11-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/2e11264aafe476c7a53accde4a23cfc2395a02fd"},{"sha":"1a95404fbd34f4ed66fa2450869fb3b384b0a97b","author":{"name":"Emilio G. Cota","email":"2ef58f7968325b2e7ec839e83a175e093b7d2b07@braap.org"},"message":"qht: add test program\n\nAcked-by: Sergey Fedorov <sergey.fedorov@linaro.org>\nReviewed-by: Alex Bennée <alex.bennee@linaro.org>\nReviewed-by: Richard Henderson <rth@twiddle.net>\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-12-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/1a95404fbd34f4ed66fa2450869fb3b384b0a97b"},{"sha":"515864a0d7a2033163e8e08df20b7873bb6287ae","author":{"name":"Emilio G. Cota","email":"2ef58f7968325b2e7ec839e83a175e093b7d2b07@braap.org"},"message":"qht: add qht-bench, a performance benchmark\n\nThis serves as a performance benchmark as well as a stress test\nfor QHT. We can tweak quite a number of things, including the\nnumber of resize threads and how frequently resizes are triggered.\n\nA performance comparison of QHT vs CLHT[1] and ck_hs[2] using\nthis same benchmark program can be found here:\n  http://imgur.com/a/0Bms4\n\nThe tests are run on a 64-core AMD Opteron 6376, pinning threads\nto cores favoring same-socket cores. For each run, qht-bench is\ninvoked with:\n  $ tests/qht-bench -d $duration -n $n -u $u -g $range\n, where $duration is in seconds, $n is the number of threads,\n$u is the update rate (0.0 to 100.0), and $range is the number\nof keys.\n\nNote that ck_hs's performance drops significantly as writes go\nup, since it requires an external lock (I used a ck_spinlock)\naround every write.\n\nAlso, note that CLHT instead of using a seqlock, relies on an\nallocator that does not ever return the same address during the\nsame read-critical section. This gives it a slight performance\nadvantage over QHT on read-heavy workloads, since the seqlock\nwrites aren't there.\n\n[1] CLHT: https://github.com/LPD-EPFL/CLHT\n          https://infoscience.epfl.ch/record/207109/files/ascy_asplos15.pdf\n\n[2] ck_hs: http://concurrencykit.org/\n           http://backtrace.io/blog/blog/2015/03/13/workload-specialization/\n\nA few of those plots are shown in text here, since that site\nmight not be online forever. Throughput is on Mops/s on the Y axis.\n\n                             200K keys, 0 % updates\n\n  450 ++--+------+------+-------+-------+-------+-------+------+-------+--++\n      |   +      +      +       +       +       +       +      +      +N+  |\n  400 ++                                                           ---+E+ ++\n      |                                                       +++----      |\n  350 ++          9 ++------+------++                       --+E+    -+H+ ++\n      |             |      +H+-     |                 -+N+----   ---- +++  |\n  300 ++          8 ++     +E+     ++             -----+E+  --+H+         ++\n      |             |      +++      |         -+N+-----+H+--               |\n  250 ++          7 ++------+------++  +++-----+E+----                    ++\n  200 ++                    1         -+E+-----+H+                        ++\n      |                           ----                     qht +-E--+      |\n  150 ++                      -+E+                        clht +-H--+     ++\n      |                   ----                              ck +-N--+      |\n  100 ++               +E+                                                ++\n      |            ----                                                    |\n   50 ++       -+E+                                                       ++\n      |   +E+E+  +      +       +       +       +       +      +       +   |\n    0 ++--E------+------+-------+-------+-------+-------+------+-------+--++\n          1      8      16      24      32      40      48     56      64\n                                Number of threads\n\n                             200K keys, 1 % updates\n\n  350 ++--+------+------+-------+-------+-------+-------+------+-------+--++\n      |   +      +      +       +       +       +       +      +     -+E+  |\n  300 ++                                                         -----+H+ ++\n      |                                                       +E+--        |\n      |           9 ++------+------++                  +++----             |\n  250 ++            |      +E+   -- |                 -+E+                ++\n      |           8 ++         --  ++             ----                     |\n  200 ++            |      +++-     |  +++  ---+E+                        ++\n      |           7 ++------N------++ -+E+--               qht +-E--+      |\n      |                     1  +++----                    clht +-H--+      |\n  150 ++                      -+E+                          ck +-N--+     ++\n      |                   ----                                             |\n  100 ++               +E+                                                ++\n      |            ----                                                    |\n      |        -+E+                                                        |\n   50 ++    +H+-+N+----+N+-----+N+------                                  ++\n      |   +E+E+  +      +       +      +N+-----+N+-----+N+----+N+-----+N+  |\n    0 ++--E------+------+-------+-------+-------+-------+------+-------+--++\n          1      8      16      24      32      40      48     56      64\n                                Number of threads\n\n                             200K keys, 20 % updates\n\n  300 ++--+------+------+-------+-------+-------+-------+------+-------+--++\n      |   +      +      +       +       +       +       +      +       +   |\n      |                                                              -+H+  |\n  250 ++                                                         ----     ++\n      |           9 ++------+------++                       --+H+  ---+E+  |\n      |           8 ++     +H+--   ++                 -+H+----+E+--        |\n  200 ++            |      +E+    --|             -----+E+--  +++         ++\n      |           7 ++      + ---- ++       ---+H+---- +++ qht +-E--+      |\n  150 ++          6 ++------N------++ -+H+-----+E+        clht +-H--+     ++\n      |                     1     -----+E+--                ck +-N--+      |\n      |                       -+H+----                                     |\n  100 ++                  -----+E+                                        ++\n      |                +E+--                                               |\n      |            ----+++                                                 |\n   50 ++       -+E+                                                       ++\n      |     +E+ +++                                                        |\n      |   +E+N+-+N+-----+       +       +       +       +      +       +   |\n    0 ++--E------+------N-------N-------N-------N-------N------N-------N--++\n          1      8      16      24      32      40      48     56      64\n                                Number of threads\n\n                            200K keys, 100 % updates       qht +-E--+\n                                                          clht +-H--+\n  160 ++--+------+------+-------+-------+-------+-------+---ck-+-N-----+--++\n      |   +      +      +       +       +       +       +      +   ----H   |\n  140 ++                                                      +H+--  -+E+ ++\n      |                                                +++----   ----      |\n  120 ++          8 ++------+------++                 -+H+    +E+         ++\n      |           7 ++     +H+---- ++             ---- +++----             |\n  100 ++            |      +E+      |  +++  ---+H+    -+E+                ++\n      |           6 ++     +++     ++ -+H+--   +++----                     |\n   80 ++          5 ++------N----------+E+-----+E+                        ++\n      |                     1 -+H+---- +++                                 |\n      |                   -----+E+                                         |\n   60 ++               +H+---- +++                                        ++\n      |            ----+E+                                                 |\n   40 ++        +H+----                                                   ++\n      |       --+E+                                                        |\n   20 ++    +E+                                                           ++\n      |  +EE+    +      +       +       +       +       +      +       +   |\n    0 ++--+N-N---N------N-------N-------N-------N-------N------N-------N--++\n          1      8      16      24      32      40      48     56      64\n                                Number of threads\n\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-13-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/515864a0d7a2033163e8e08df20b7873bb6287ae"},{"sha":"896a9ee96720c5cc7e00e63943435ccccec54d23","author":{"name":"Emilio G. Cota","email":"2ef58f7968325b2e7ec839e83a175e093b7d2b07@braap.org"},"message":"qht: add test-qht-par to invoke qht-bench from 'check' target\n\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-14-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/896a9ee96720c5cc7e00e63943435ccccec54d23"},{"sha":"909eaac9bbc2ed4f3a82ce38e905b87d478a3e00","author":{"name":"Emilio G. Cota","email":"2ef58f7968325b2e7ec839e83a175e093b7d2b07@braap.org"},"message":"tb hash: track translated blocks with qht\n\nHaving a fixed-size hash table for keeping track of all translation blocks\nis suboptimal: some workloads are just too big or too small to get maximum\nperformance from the hash table. The MRU promotion policy helps improve\nperformance when the hash table is a little undersized, but it cannot\nmake up for severely undersized hash tables.\n\nFurthermore, frequent MRU promotions result in writes that are a scalability\nbottleneck. For scalability, lookups should only perform reads, not writes.\nThis is not a big deal for now, but it will become one once MTTCG matures.\n\nThe appended fixes these issues by using qht as the implementation of\nthe TB hash table. This solution is superior to other alternatives considered,\nnamely:\n\n- master: implementation in QEMU before this patchset\n- xxhash: before this patch, i.e. fixed buckets + xxhash hashing + MRU.\n- xxhash-rcu: fixed buckets + xxhash + RCU list + MRU.\n              MRU is implemented here by adding an intermediate struct\n              that contains the u32 hash and a pointer to the TB; this\n              allows us, on an MRU promotion, to copy said struct (that is not\n              at the head), and put this new copy at the head. After a grace\n              period, the original non-head struct can be eliminated, and\n              after another grace period, freed.\n- qht-fixed-nomru: fixed buckets + xxhash + qht without auto-resize +\n                   no MRU for lookups; MRU for inserts.\nThe appended solution is the following:\n- qht-dyn-nomru: dynamic number of buckets + xxhash + qht w/ auto-resize +\n                 no MRU for lookups; MRU for inserts.\n\nThe plots below compare the considered solutions. The Y axis shows the\nboot time (in seconds) of a debian jessie image with arm-softmmu; the X axis\nsweeps the number of buckets (or initial number of buckets for qht-autoresize).\nThe plots in PNG format (and with errorbars) can be seen here:\n  http://imgur.com/a/Awgnq\n\nEach test runs 5 times, and the entire QEMU process is pinned to a\nsingle core for repeatability of results.\n\n                            Host: Intel Xeon E5-2690\n\n  28 ++------------+-------------+-------------+-------------+------------++\n     A*****        +             +             +             master **A*** +\n  27 ++    *                                                 xxhash ##B###++\n     |      A******A******                               xxhash-rcu $$C$$$ |\n  26 C$$                  A******A******            qht-fixed-nomru*%%D%%%++\n     D%%$$                              A******A******A*qht-dyn-mru A*E****A\n  25 ++ %%$$                                          qht-dyn-nomru &&F&&&++\n     B#####%                                                               |\n  24 ++    #C$$$$$                                                        ++\n     |      B###  $                                                        |\n     |          ## C$$$$$$                                                 |\n  23 ++           #       C$$$$$$                                         ++\n     |             B######       C$$$$$$                                %%%D\n  22 ++                  %B######       C$$$$$$C$$$$$$C$$$$$$C$$$$$$C$$$$$$C\n     |                    D%%%%%%B######      @E@@@@@@    %%%D%%%@@@E@@@@@@E\n  21 E@@@@@@E@@@@@@F&&&@@@E@@@&&&D%%%%%%B######B######B######B######B######B\n     +             E@@@   F&&&   +      E@     +      F&&&   +             +\n  20 ++------------+-------------+-------------+-------------+------------++\n     14            16            18            20            22            24\n                             log2 number of buckets\n\n                                 Host: Intel i7-4790K\n\n  14.5 ++------------+------------+-------------+------------+------------++\n       A**           +            +             +            master **A*** +\n    14 ++ **                                                 xxhash ##B###++\n  13.5 ++   **                                           xxhash-rcu $$C$$$++\n       |                                            qht-fixed-nomru %%D%%% |\n    13 ++     A******                                   qht-dyn-mru @@E@@@++\n       |             A*****A******A******             qht-dyn-nomru &&F&&& |\n  12.5 C$$                               A******A******A*****A******    ***A\n    12 ++ $$                                                        A***  ++\n       D%%% $$                                                             |\n  11.5 ++  %%                                                             ++\n       B###  %C$$$$$$                                                      |\n    11 ++  ## D%%%%% C$$$$$                                               ++\n       |     #      %      C$$$$$$                                         |\n  10.5 F&&&&&&B######D%%%%%       C$$$$$$C$$$$$$C$$$$$$C$$$$$C$$$$$$    $$$C\n    10 E@@@@@@E@@@@@@B#####B######B######E@@@@@@E@@@%%%D%%%%%D%%%###B######B\n       +             F&&          D%%%%%%B######B######B#####B###@@@D%%%   +\n   9.5 ++------------+------------+-------------+------------+------------++\n       14            16           18            20           22            24\n                              log2 number of buckets\n\nNote that the original point before this patch series is X=15 for \"master\";\nthe little sensitivity to the increased number of buckets is due to the\npoor hashing function in master.\n\nxxhash-rcu has significant overhead due to the constant churn of allocating\nand deallocating intermediate structs for implementing MRU. An alternative\nwould be do consider failed lookups as \"maybe not there\", and then\nacquire the external lock (tb_lock in this case) to really confirm that\nthere was indeed a failed lookup. This, however, would not be enough\nto implement dynamic resizing--this is more complex: see\n\"Resizable, Scalable, Concurrent Hash Tables via Relativistic\nProgramming\" by Triplett, McKenney and Walpole. This solution was\ndiscarded due to the very coarse RCU read critical sections that we have\nin MTTCG; resizing requires waiting for readers after every pointer update,\nand resizes require many pointer updates, so this would quickly become\nprohibitive.\n\nqht-fixed-nomru shows that MRU promotion is advisable for undersized\nhash tables.\n\nHowever, qht-dyn-mru shows that MRU promotion is not important if the\nhash table is properly sized: there is virtually no difference in\nperformance between qht-dyn-nomru and qht-dyn-mru.\n\nBefore this patch, we're at X=15 on \"xxhash\"; after this patch, we're at\nX=15 @ qht-dyn-nomru. This patch thus matches the best performance that we\ncan achieve with optimum sizing of the hash table, while keeping the hash\ntable scalable for readers.\n\nThe improvement we get before and after this patch for booting debian jessie\nwith arm-softmmu is:\n\n- Intel Xeon E5-2690: 10.5% less time\n- Intel i7-4790K: 5.2% less time\n\nWe could get this same improvement _for this particular workload_ by\nstatically increasing the size of the hash table. But this would hurt\nworkloads that do not need a large hash table. The dynamic (upward)\nresizing allows us to start small and enlarge the hash table as needed.\n\nA quick note on downsizing: the table is resized back to 2**15 buckets\non every tb_flush; this makes sense because it is not guaranteed that the\ntable will reach the same number of TBs later on (e.g. most bootup code is\nthrown away after boot); it makes sense to grow the hash table as\nmore code blocks are translated. This also avoids the complication of\nhaving to build downsizing hysteresis logic into qht.\n\nReviewed-by: Sergey Fedorov <serge.fedorov@linaro.org>\nReviewed-by: Alex Bennée <alex.bennee@linaro.org>\nReviewed-by: Richard Henderson <rth@twiddle.net>\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-15-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/909eaac9bbc2ed4f3a82ce38e905b87d478a3e00"},{"sha":"329844d4bc3d5a11f1e63938d66f74c9584c7abc","author":{"name":"Emilio G. Cota","email":"2ef58f7968325b2e7ec839e83a175e093b7d2b07@braap.org"},"message":"translate-all: add tb hash bucket info to 'info jit' dump\n\nExamples:\n\n- Good hashing, i.e. tb_hash_func5(phys_pc, pc, flags):\nTB count            715135/2684354\n[...]\nTB hash buckets     388775/524288 (74.15% head buckets used)\nTB hash occupancy   33.04% avg chain occ. Histogram: [0,10)%|▆ █  ▅▁▃▁▁|[90,100]%\nTB hash avg chain   1.017 buckets. Histogram: 1|█▁▁|3\n\n- Not-so-good hashing, i.e. tb_hash_func5(phys_pc, pc, 0):\nTB count            712636/2684354\n[...]\nTB hash buckets     344924/524288 (65.79% head buckets used)\nTB hash occupancy   31.64% avg chain occ. Histogram: [0,10)%|█ ▆  ▅▁▃▁▂|[90,100]%\nTB hash avg chain   1.047 buckets. Histogram: 1|█▁▁▁|4\n\n- Bad hashing, i.e. tb_hash_func5(phys_pc, 0, 0):\nTB count            702818/2684354\n[...]\nTB hash buckets     112741/524288 (21.50% head buckets used)\nTB hash occupancy   10.15% avg chain occ. Histogram: [0,10)%|█ ▁  ▁▁▁▁▁|[90,100]%\nTB hash avg chain   2.107 buckets. Histogram: [1.0,10.2)|█▁▁▁▁▁▁▁▁▁|[83.8,93.0]\n\n- Good hashing, but no auto-resize:\nTB count            715634/2684354\nTB hash buckets     8192/8192 (100.00% head buckets used)\nTB hash occupancy   98.30% avg chain occ. Histogram: [95.3,95.8)%|▁▁▃▄▃▄▁▇▁█|[99.5,100.0]%\nTB hash avg chain   22.070 buckets. Histogram: [15.0,16.7)|▁▂▅▄█▅▁▁▁▁|[30.3,32.0]\n\nAcked-by: Sergey Fedorov <sergey.fedorov@linaro.org>\nSuggested-by: Richard Henderson <rth@twiddle.net>\nReviewed-by: Richard Henderson <rth@twiddle.net>\nSigned-off-by: Emilio G. Cota <cota@braap.org>\nMessage-Id: <1465412133-3029-16-git-send-email-cota@braap.org>\nSigned-off-by: Richard Henderson <rth@twiddle.net>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/329844d4bc3d5a11f1e63938d66f74c9584c7abc"},{"sha":"da2fdd0bd1514a44309dd5be162ebfb6c166a716","author":{"name":"Peter Maydell","email":"d4da0cae8bdd6af8ce5950fc7fec7c012df68229@linaro.org"},"message":"Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20160611' into staging\n\nTB hashing improvements\n\n# gpg: Signature made Sun 12 Jun 2016 01:12:50 BST\n# gpg:                using RSA key 0xAD1270CC4DD0279B\n# gpg: Good signature from \"Richard Henderson <rth7680@gmail.com>\"\n# gpg:                 aka \"Richard Henderson <rth@redhat.com>\"\n# gpg:                 aka \"Richard Henderson <rth@twiddle.net>\"\n# Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC  16A4 AD12 70CC 4DD0 279B\n\n* remotes/rth/tags/pull-tcg-20160611:\n  translate-all: add tb hash bucket info to 'info jit' dump\n  tb hash: track translated blocks with qht\n  qht: add test-qht-par to invoke qht-bench from 'check' target\n  qht: add qht-bench, a performance benchmark\n  qht: add test program\n  qht: QEMU's fast, resizable and scalable Hash Table\n  qdist: add test program\n  qdist: add module to represent frequency distributions of data\n  tb hash: hash phys_pc, pc, and flags with xxhash\n  exec: add tb_hash_func5, derived from xxhash\n  qemu-thread: add simple test-and-set spinlock\n  include/processor.h: define cpu_relax()\n  seqlock: rename write_lock/unlock to write_begin/end\n  seqlock: remove optional mutex\n  compiler.h: add QEMU_ALIGNED() to enforce struct alignment\n\nSigned-off-by: Peter Maydell <peter.maydell@linaro.org>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/da2fdd0bd1514a44309dd5be162ebfb6c166a716"},{"sha":"d6b6aec4091a11e5429aac4d56ad0295c5316375","author":{"name":"Anthony PERARD","email":"fe5c17da6e226e2dea68fcc2f543ea615504bdf2@citrix.com"},"message":"exec: Fix qemu_ram_block_from_host for Xen\n\nSince f615f39 (exec: remove ram_addr argument from\nqemu_ram_block_from_host), migration under Xen is likely to fail, with a\nSEGV of QEMU. But the commit only reveal a bug with the calculation of\nthe offset value in qemu_ram_block_from_host().\n\nThis patch calculates the offset from the ram_addr as\nqemu_ram_addr_from_host() will later calculate the ram_addr from the\noffset.\n\nSigned-off-by: Anthony PERARD <anthony.perard@citrix.com>\nAcked-by: Paolo Bonzini <pbonzini@redhat.com>\nSigned-off-by: Stefano Stabellini <sstabellini@kernel.org>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/d6b6aec4091a11e5429aac4d56ad0295c5316375"},{"sha":"88c16567d2cd23da328787187910b013ee43ebca","author":{"name":"Wen Congyang","email":"756dfb314906a981577255ff5457432787919f4a@cn.fujitsu.com"},"message":"Introduce \"xen-load-devices-state\"\n\nIntroduce a \"xen-load-devices-state\" QAPI command that can be used to\nload the state of all devices, but not the RAM or the block devices of\nthe VM.\n\nWe only have hmp commands savevm/loadvm, and qmp commands\nxen-save-devices-state.\n\nWe use this new command for COLO:\n1. suspend both primary vm and secondary vm\n2. sync the state\n3. resume both primary vm and secondary vm\n\nIn such case, we need to update all devices' state in any time.\n\nSigned-off-by: Wen Congyang <wency@cn.fujitsu.com>\nSigned-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>\nReviewed-by: Anthony PERARD <anthony.perard@citrix.com>\nReviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>\nSigned-off-by: Stefano Stabellini <sstabellini@kernel.org>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/88c16567d2cd23da328787187910b013ee43ebca"},{"sha":"e058fa2dd599ccc780d334558be9c1d155222b80","author":{"name":"Gerd Hoffmann","email":"5fd8703623f9a82e7a4029584fa01bc629e338d9@redhat.com"},"message":"usb-host: add special case for bus+addr\n\nThis patch changes usb-host behavior in case we hostbus= and hostaddr=\nproperties are used to identify the usb device in question.  Instead of\nadding the device to the hotplug watchlist we try to open directly using\nthe given bus number and device address.\n\nPutting a device specified by hostaddr to the hotplug watchlist isn't\na great idea as the address isn't a fixed property.  It changes every\ntime the device is plugged in.  So considering this case as \"use the\ndevice at bus:addr _now_\" is more sane.  Also usb-host will throw errors\nin case it can't initialize the host device.\n\nNote: For devices on the hotplug watchlist (hostport or vendorid or\nproductid specified) qemu continues to ignore errors and keeps\nmonitoring the usb bus to see if the device eventually shows up.\n\nSigned-off-by: Gerd Hoffmann <kraxel@redhat.com>\nMessage-id: 1464945175-28939-1-git-send-email-kraxel@redhat.com","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/e058fa2dd599ccc780d334558be9c1d155222b80"},{"sha":"8fdf038722a00693e68b4f76a66d39781572c3ec","author":{"name":"Peter Maydell","email":"d4da0cae8bdd6af8ce5950fc7fec7c012df68229@linaro.org"},"message":"Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20160613-tag' into staging\n\nXen 2016/06/13\n\n# gpg: Signature made Mon 13 Jun 2016 11:53:18 BST\n# gpg:                using RSA key 0x894F8F4870E1AE90\n# gpg: Good signature from \"Stefano Stabellini <stefano.stabellini@eu.citrix.com>\"\n# Primary key fingerprint: D04E 33AB A51F 67BA 07D3  0AEA 894F 8F48 70E1 AE90\n\n* remotes/sstabellini/tags/xen-20160613-tag:\n  Introduce \"xen-load-devices-state\"\n  exec: Fix qemu_ram_block_from_host for Xen\n\nSigned-off-by: Peter Maydell <peter.maydell@linaro.org>","distinct":true,"url":"https://api.github.com/repos/francois-wellenreiter/qemu/commits/8fdf038722a00693e68b4f76a66d39781572c3ec"}]}
{"actor":{"display_login":"francois-wellenreiter"}}