{"push_id":936795056,"size":16,"distinct_size":0,"ref":"refs/heads/<1452870739-28484-1-git-send-email-pbonzini@redhat.com>","head":"6a07a1b26d908aeb7acdd663cbeed385e530ba36","before":"27e401ca054d619791cac7b9dbca5d143897b6b1","commits":[{"sha":"cae096c3981ecc9ed03ea55e1e14c399fe38ca90","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"aio: introduce aio_context_in_iothread\n\nThis will be used by the synchronous I/O helpers, to choose between\naio_poll or QemuEvent.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-2-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/cae096c3981ecc9ed03ea55e1e14c399fe38ca90"},{"sha":"b4d66423aa7e2685653abe8812f13d09c3d1e9ad","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"aio: do not really acquire/release the main AIO context\n\nThe main AIO context is used in many places that are not aware\nof AioContexts at all.  bdrv_drain will soon do a release/acquire\nitself, which for the main AIO context would break because code\ncalls bdrv_drain on it without acquiring anything.\n\nVery soon, bdrv will be ready for removal of aio_context_acquire\nfrom non-block-layer code.  The idea is that the AioContext will be\nacquired by bdrv_*, and no one will care of what's running in the\nmain I/O thread or in the dataplane thread.  Even if there are two\nconcurrent instances of the I/O thread, locks protect the data\nstructures; this evolves naturally to the multiqueue case where\nthere are multiple I/O threads touching the same BlockDriverState.\n\nWhen this happens, aio_context_acquire/release can go away, replaced\nby fine-grained locks, and this hack will also go away with it.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-3-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/b4d66423aa7e2685653abe8812f13d09c3d1e9ad"},{"sha":"50d74eef74c841a7431577d68c6cad111ebf409d","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"aio: introduce aio_poll_internal\n\nMove the implemntation of aio_poll to aio_poll_internal, and introduce\na wrapper for public use.  For now it just asserts that aio_poll is\nbeing used correctly---either from the thread that manages the context,\nor with the QEMU global mutex held.\n\nThe next patch, however, will completely separate the two cases.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-4-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/50d74eef74c841a7431577d68c6cad111ebf409d"},{"sha":"c8b427b7b707eede79d7705792c95d6dc5373306","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"aio: only call aio_poll_internal from iothread\n\naio_poll is not thread safe; it can report progress incorrectly when\ncalled from the main thread.  The bug remains latent as long as\nall of it is called within aio_context_acquire/aio_context_release,\nbut this will change soon.\n\nThe details of the bug are pretty simple, but fixing it in an\nefficient way is thorny.  There are plenty of comments and formal\nmodels in the patch, so I will refer to it.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-5-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/c8b427b7b707eede79d7705792c95d6dc5373306"},{"sha":"5d780dcae8217e1b5e9ba288adca6675e287d103","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"iothread: release AioContext around aio_poll\n\nThis is the first step towards having fine-grained critical sections in\ndataplane threads, which resolves lock ordering problems between\naddress_space_* functions (which need the BQL when doing MMIO, even\nafter we complete RCU-based dispatch) and the AioContext.\n\nBecause AioContext does not use contention callbacks anymore, the\nunit test has to be changed.\n\nPreviously applied as a0710f7995f914e3044e5899bd8ff6c43c62f916 and\nthen reverted.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-6-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/5d780dcae8217e1b5e9ba288adca6675e287d103"},{"sha":"da3262a8884e6d2afe7cd48be6e1d540c934fe0b","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"qemu-thread: introduce QemuRecMutex\n\nGRecMutex is new in glib 2.32, so we cannot use it.  Introduce\na recursive mutex in qemu-thread instead, which will be used\ninstead of RFifoLock.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-7-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/da3262a8884e6d2afe7cd48be6e1d540c934fe0b"},{"sha":"765370fdfc4d3ed30c404b98899e198d0828b9ac","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"aio: convert from RFifoLock to QemuRecMutex\n\nIt is simpler and a bit faster, and QEMU does not need the contention\ncallbacks (and thus the fairness) anymore.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-8-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/765370fdfc4d3ed30c404b98899e198d0828b9ac"},{"sha":"37492cfa37189227d0774d8e5a6f23d655613036","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"aio: rename bh_lock to list_lock\n\nThis will be used for AioHandlers too.  There is going to be little\nor no contention, so it is better to reuse the same lock.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-9-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/37492cfa37189227d0774d8e5a6f23d655613036"},{"sha":"93841d31501d4dbc8ce5306eab825f4587a217db","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"qemu-thread: introduce QemuLockCnt\n\nA QemuLockCnt comprises a counter and a mutex, with primitives\nto increment and decrement the counter, and to take and release the\nmutex.  It can be used to do lock-free visits to a data structure\nwhenever mutexes would be too heavy-weight and the critical section\nis too long for RCU.\n\nThis could be implemented simply by protecting the counter with the\nmutex, but QemuLockCnt is harder to misuse and more efficient.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-10-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/93841d31501d4dbc8ce5306eab825f4587a217db"},{"sha":"b076ad8ebbacc9e3731a3e6f2ad3bc11d1a84fd1","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"aio: make ctx->list_lock a QemuLockCnt, subsuming ctx->walking_bh\n\nThis will make it possible to walk the list of bottom halves without\nholding the AioContext lock---and in turn to call bottom half\nhandlers without holding the lock.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-11-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/b076ad8ebbacc9e3731a3e6f2ad3bc11d1a84fd1"},{"sha":"9bea8d6d73c49b56a65bbd8c2e8dce8444d47552","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"qemu-thread: optimize QemuLockCnt with futexes on Linux\n\nThis is complex, but I think it is reasonably documented in the source.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-12-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/9bea8d6d73c49b56a65bbd8c2e8dce8444d47552"},{"sha":"40fbe120a00e1a68c570055e122055385beb8971","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"aio: tweak walking in dispatch phase\n\nPreparing for the following patch, use QLIST_FOREACH_SAFE and\nmodify the placement of walking_handlers increment/decrement.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-13-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/40fbe120a00e1a68c570055e122055385beb8971"},{"sha":"3994a7e11542d88f6555a8f1fb51a0cae48bb9f4","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"aio-posix: remove walking_handlers, protecting AioHandler list with list_lock\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-14-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/3994a7e11542d88f6555a8f1fb51a0cae48bb9f4"},{"sha":"f8446dd3000a514f2afa91911337a7de21e93195","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"aio-win32: remove walking_handlers, protecting AioHandler list with list_lock\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-15-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/f8446dd3000a514f2afa91911337a7de21e93195"},{"sha":"689fb4341d42dd3cace282d9cb78358ab327ab49","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"aio: document locking\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-16-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/689fb4341d42dd3cace282d9cb78358ab327ab49"},{"sha":"6a07a1b26d908aeb7acdd663cbeed385e530ba36","author":{"email":"69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com","name":"Paolo Bonzini"},"message":"aio: push aio_context_acquire/release down to dispatching\n\nThe AioContext data structures are now protected by list_lock and/or\nthey are walked with FOREACH_RCU primitives.  There is no need anymore\nto acquire the AioContext for the entire duration of aio_dispatch.\nInstead, just acquire it before and after invoking the callbacks.\nThe next step is then to push it further down.\n\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\nMessage-Id: <1452870739-28484-17-git-send-email-pbonzini@redhat.com>","distinct":false,"url":"https://api.github.com/repos/famz/qemu-patchew/commits/6a07a1b26d908aeb7acdd663cbeed385e530ba36"}]}