{"push_id":757114245,"size":11,"distinct_size":11,"ref":"refs/heads/mttcg","head":"ca56de6f82bb1cb946a853d9a0c827c680f801b4","before":"248bdff68ab37160de97d9673f253527792f9266","commits":[{"sha":"ac231805e0f930c269ec7665ef83c4411b320eb6","author":{"email":"36466e9b5a97cd03f1032f941dcb7c6f26370f3f@greensocs.com","name":"KONRAD Frederic"},"message":"tcg: move tb_find_fast outside the tb_lock critical section\n\nSigned-off-by: KONRAD Frederic <fred.konrad@greensocs.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>","distinct":true,"url":"https://api.github.com/repos/bonzini/qemu/commits/ac231805e0f930c269ec7665ef83c4411b320eb6"},{"sha":"6c53f1a16daba74aa04eab95462921fe2adf8205","author":{"email":"36466e9b5a97cd03f1032f941dcb7c6f26370f3f@greensocs.com","name":"KONRAD Frederic"},"message":"Drop global lock during TCG code execution\n\nThis finally allows TCG to benefit from the iothread introduction: Drop\nthe global mutex while running pure TCG CPU code. Reacquire the lock\nwhen entering MMIO or PIO emulation, or when leaving the TCG loop.\n\nWe have to revert a few optimization for the current TCG threading\nmodel, namely kicking the TCG thread in qemu_mutex_lock_iothread and not\nkicking it in qemu_cpu_kick. We also need to disable RAM block\nreordering until we have a more efficient locking mechanism at hand.\n\nI'm pretty sure some cases are still broken, definitely SMP (we no\nlonger perform round-robin scheduling \"by chance\"). Still, a Linux x86\nUP guest and my Musicpal ARM model boot fine here. These numbers\ndemonstrate where we gain something:\n\n20338 jan       20   0  331m  75m 6904 R   99  0.9   0:50.95 qemu-system-arm\n20337 jan       20   0  331m  75m 6904 S   20  0.9   0:26.50 qemu-system-arm\n\nThe guest CPU was fully loaded, but the iothread could still run mostly\nindependent on a second core. Without the patch we don't get beyond\n\n32206 jan       20   0  330m  73m 7036 R   82  0.9   1:06.00 qemu-system-arm\n32204 jan       20   0  330m  73m 7036 S   21  0.9   0:17.03 qemu-system-arm\n\nWe don't benefit significantly, though, when the guest is not fully\nloading a host CPU.\n\nNote that this patch depends on\nhttp://thread.gmane.org/gmane.comp.emulators.qemu/118657\n\nChanges from Fred Konrad:\n  * Rebase on the current HEAD.\n  * Fixes a deadlock in qemu_devices_reset().\n  * Remove the mutex in address_space_*\n\nMessage-Id: <1439220437-23957-10-git-send-email-fred.konrad@greensocs.com>\nSigned-off-by: KONRAD Frederic <fred.konrad@greensocs.com>","distinct":true,"url":"https://api.github.com/repos/bonzini/qemu/commits/6c53f1a16daba74aa04eab95462921fe2adf8205"},{"sha":"6f982e223dd588e2275fb58353bb87f89cb548a7","author":{"email":"36466e9b5a97cd03f1032f941dcb7c6f26370f3f@greensocs.com","name":"KONRAD Frederic"},"message":"tcg: switch on multithread.\n\nThis switches on multithread.\n\nProbably signal-free qemu_cpu_kick should be extracted from this patch.\n\nThis has a ~15% performance penalty on dhrystone compared to before this\nseries, and ~25% compared to the point where the global lock was dropped.\n\nSigned-off-by: KONRAD Frederic <fred.konrad@greensocs.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>","distinct":true,"url":"https://api.github.com/repos/bonzini/qemu/commits/6f982e223dd588e2275fb58353bb87f89cb548a7"},{"sha":"760b178b659699e6b04a6f772d60f3f970ac75ab","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"drop unused qemu/tls.h file\n\nQEMU now uses __thread.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>","distinct":true,"url":"https://api.github.com/repos/bonzini/qemu/commits/760b178b659699e6b04a6f772d60f3f970ac75ab"},{"sha":"c65d28a07fe34073f54233e6ea95ff6a39fa0421","author":{"email":"f9d57e137ea19889718188dc74ec125e781a8ea3@greensocs.com","name":"Guillaume Delbergue"},"message":"add support for spin lock on POSIX systems exclusively\n\nWARNING: spin lock is currently not implemented on WIN32\n\nSigned-off-by: Guillaume Delbergue <guillaume.delbergue@greensocs.com>\nMessage-Id: <1439220437-23957-7-git-send-email-fred.konrad@greensocs.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>","distinct":true,"url":"https://api.github.com/repos/bonzini/qemu/commits/c65d28a07fe34073f54233e6ea95ff6a39fa0421"},{"sha":"95207f7fb51d814e1104907fcee4c37d1484ae01","author":{"email":"36466e9b5a97cd03f1032f941dcb7c6f26370f3f@greensocs.com","name":"KONRAD Frederic"},"message":"Use atomic cmpxchg to atomically check the exclusive value in a STREX\n\nThis mechanism replaces the existing load/store exclusive mechanism which seems\nto be broken for multithread.\nIt follows the intention of the existing mechanism and stores the target address\nand data values during a load operation and checks that they remain unchanged\nbefore a store.\n\nIn common with the older approach, this provides weaker semantics than required\nin that it could be that a different processor writes the same value as a\nnon-exclusive write, however in practise this seems to be irrelevant.\n\nThe old implementation didn’t correctly store it’s values as globals, but rather\nkept a local copy per CPU.\n\nThis new mechanism stores the values globally and also uses the atomic cmpxchg\nmacros to ensure atomicity - it is therefore very efficient and threadsafe.\n\nSigned-off-by: KONRAD Frederic <fred.konrad@greensocs.com>\n\nChanges:\n  V5 -> V6:\n    * Use spinlock instead of mutex.\n    * Fix the length for address map.\n    * Fix the return address for tlb_fill.\n  V4 -> V5:\n    * Remove atomic_check and atomic_release which were unused.\nMessage-Id: <1439220437-23957-13-git-send-email-fred.konrad@greensocs.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>","distinct":true,"url":"https://api.github.com/repos/bonzini/qemu/commits/95207f7fb51d814e1104907fcee4c37d1484ae01"},{"sha":"bd4b911a117b882f46e0b7a3242d0f72fb0fcbaa","author":{"email":"36466e9b5a97cd03f1032f941dcb7c6f26370f3f@greensocs.com","name":"KONRAD Frederic"},"message":"cpu: introduce tlb_flush*_all.\n\nSome architectures allow to flush the tlb of other VCPUs. This is not a problem\nwhen we have only one thread for all VCPUs but it definitely needs to be an\nasynchronous work when we are in true multithreaded work.\n\nTODO: Some test case, I fear some bad results in case a VCPUs execute a barrier\n      or something like that.\n\nSigned-off-by: KONRAD Frederic <fred.konrad@greensocs.com>\nMessage-Id: <1439220437-23957-15-git-send-email-fred.konrad@greensocs.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>","distinct":true,"url":"https://api.github.com/repos/bonzini/qemu/commits/bd4b911a117b882f46e0b7a3242d0f72fb0fcbaa"},{"sha":"0565940920c67071e2f0d053ce2673e7600066af","author":{"email":"36466e9b5a97cd03f1032f941dcb7c6f26370f3f@greensocs.com","name":"KONRAD Frederic"},"message":"arm: use tlb_flush*_all\n\nThis just use the new mechanism to ensure that each VCPU thread flush its own\nVCPU.\n\nSigned-off-by: KONRAD Frederic <fred.konrad@greensocs.com>\nMessage-Id: <1439220437-23957-16-git-send-email-fred.konrad@greensocs.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>","distinct":true,"url":"https://api.github.com/repos/bonzini/qemu/commits/0565940920c67071e2f0d053ce2673e7600066af"},{"sha":"bdb70b64761487cbc882027e79936bcd608c3731","author":{"email":"36466e9b5a97cd03f1032f941dcb7c6f26370f3f@greensocs.com","name":"KONRAD Frederic"},"message":"cpus: introduce async_run_safe_work_on_cpu.\n\nWe already had async_run_on_cpu but we need all VCPUs outside their execution\nloop to execute some tb_flush/invalidate task:\n\nasync_run_on_cpu_safe schedule a work on a VCPU but the work start when no more\nVCPUs are executing code.\nWhen a safe work is pending cpu_has_work returns true, so cpu_exec returns and\nthe VCPUs can't enters execution loop. cpu_thread_is_idle returns false so at\nthe moment where all VCPUs are stop || stopped the safe work queue can be\nflushed.\n\nSigned-off-by: KONRAD Frederic <fred.konrad@greensocs.com>\n\nChanges V3 -> V4:\n  * Use tcg_cpu_try_block_execution.\n  * Use a counter to know how many safe work are pending.\nChanges V2 -> V3:\n  * Unlock the mutex while executing the callback.\nChanges V1 -> V2:\n  * Move qemu_cpu_kick_thread to avoid prototype declaration.\n  * Use the work_mutex lock to protect the queued_safe_work_* structures.\nMessage-Id: <1439220437-23957-4-git-send-email-fred.konrad@greensocs.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>","distinct":true,"url":"https://api.github.com/repos/bonzini/qemu/commits/bdb70b64761487cbc882027e79936bcd608c3731"},{"sha":"1a5d2e9403b06af06b4df9855e183ebf68a68661","author":{"email":"36466e9b5a97cd03f1032f941dcb7c6f26370f3f@greensocs.com","name":"KONRAD Frederic"},"message":"translate-all: introduces tb_flush_safe.\n\ntb_flush is not thread safe we definitely need to exit VCPUs to do that.\nThis introduces tb_flush_safe which just creates an async safe work which will\ndo a tb_flush later.\n\nSigned-off-by: KONRAD Frederic <fred.konrad@greensocs.com>\nMessage-Id: <1439220437-23957-17-git-send-email-fred.konrad@greensocs.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>","distinct":true,"url":"https://api.github.com/repos/bonzini/qemu/commits/1a5d2e9403b06af06b4df9855e183ebf68a68661"},{"sha":"ca56de6f82bb1cb946a853d9a0c827c680f801b4","author":{"email":"36466e9b5a97cd03f1032f941dcb7c6f26370f3f@greensocs.com","name":"KONRAD Frederic"},"message":"translate-all: (wip) use tb_flush_safe when we can't alloc more tb.\n\nThis changes just the tb_flush called from tb_alloc.\n\nTODO:\n * changes the other tb_flush.\n\nSigned-off-by: KONRAD Frederic <fred.konrad@greensocs.com>\nMessage-Id: <1439220437-23957-18-git-send-email-fred.konrad@greensocs.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>","distinct":true,"url":"https://api.github.com/repos/bonzini/qemu/commits/ca56de6f82bb1cb946a853d9a0c827c680f801b4"}]}