iothread: create gcontext unconditionally
Status from this message: Thanks, applied to my block tree:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest5 patches 5 repliesApplied
- v14 patches 21 repliesSuperseded
Changes in v2 from the cover letter
- add comment in patch 4
- add another patch to comment why we need explicit aio_poll() in iothread_run loop
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | iothread: replace init_done_cond with a semaphoreinclude/ iothread.c | +5 | 1 reply | |
| 2/5 | iothread: create the gcontext unconditionallyinclude/ iothread.c | +22 | 0 replies | |
| 3/5 | iothread: create main loop unconditionallyiothread.c | +3 | 0 replies | |
| 4/5 | iothread: push gcontext earlier in the thread_fniothread.c | +7 | 2 replies | |
| 5/5 | iothread: document about why we need explicit aio_poll()iothread.c | +9 | 1 reply |
Reviews trailers per patch
3 of 5 patches have a Reviewed-by or Acked-by.
| Patch | Marc-André Lureau |
|---|---|
| 1/5 | |
| 2/5 | R-b |
| 3/5 | R-b |
| 4/5 | |
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH v2 0/5] iothread: create gcontext unconditionally
v2:
- add comment in patch 4
- add another patch to comment why we need explicit aio_poll() in iothread_run loop
When I first read the iothread code, the gcontext confused me for quite a while. Meanwhile, I've been tackling with some races due to this complexity as well. How much we'll pay for creating the gcontext unconditionally? Do we really need this flexibitily (or is it really a flexibility after all)? I don't see much gain of existing code, but I might be wrong. Anyway, I wrote this patchset to see how the list would think about it.
This series directly originates from previous discussion with Marc-Andre where there's a slightly hacky way to try to acquire the gcontext:
https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg05460.html
Now with this series logically above patch is not needed any more. Please read patch 4 for more information.
And if this patchset can survive... how about running gcontext directly in iothread_run()? I believe there could be a bit more things to clean but I'll see.
Make check passes for me.
Comments welcomed. Thanks,
Peter Xu (5):
iothread: replace init_done_cond with a semaphore
iothread: create the gcontext unconditionally
iothread: create main loop unconditionally
iothread: push gcontext earlier in the thread_fn
iothread: document about why we need explicit aio_poll()
include/sysemu/iothread.h | 5 +-- iothread.c | 91 +++++++++++++++++++-------------------- 2 files changed, 46 insertions(+), 50 deletions(-)
Signature · 1 line
2.17.1