Clear fd handlers
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest14 patches 6 repliesIn review
- v19 patches 4 repliesSuperseded
v1 series from the cover letter
- convert io_handlers to one QLIST
- once there, qemu_set_fd_handlers2() has lots of arguments that are a lot of times NULL. Introduce a set of functions to not have to pass NULL values.
- qemu_clear_fd_handlers(): remove it
- qemu_set_fd_read_handler(): only read
- qemu_set_fd_write_handler(): only write
- qemu_set_fd_rw_handler(): read/write
- qemu_set_fd_poll_handler(): it was only used for reads and in qemu-char.c.
- once there fix bt that don't need poll at all (having a poll function that always return true is the equivalent of not having one).
- remove cast to (void *)(unsigned long) for things that already were pointers
- IOCanRWHandler is only used for reads -> rename it (almost no users).
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | Convert io handlers to QLISTvl.c | +14 | 6 replies | |
| 2/14 | remove useless castmigration-exec.c migration-fd.c | +2 | 0 replies | |
| 3/14 | rename IOCanRWHandler to IOCanReadHandlerqemu-char.c qemu-char.h qemu-common.h +2 more | +9 | 0 replies | |
| 4/14 | bt: remove bt_host_read_poll()bt-host.c | +1 | 0 replies | |
| 5/14 | Handle deleted IOHandlers in a single passvl.c | +7 | 0 replies | |
| 6/14 | tap: insert tap_can_send() into tap_send()net/ | +9 | 0 replies | |
| 7/14 | qemu-char:stdio insert poll call into read oneqemu-char.c | +7 | 0 replies | |
| 8/14 | qemu-char:tcp insert poll call into read oneqemu-char.c | +5 | 0 replies | |
| 9/14 | qemu-char:fd insert poll call into read oneqemu-char.c | +4 | 0 replies | |
| 10/14 | qemu-char:pty insert poll call into read oneqemu-char.c | +5 | 0 replies | |
| 11/14 | qemu-char:udp insert poll call into read oneqemu-char.c | +2 | 0 replies | |
| 12/14 | Remove qemu_set_fd_handler2()aio.c migration-exec.c migration-fd.c +11 more | +46 | 0 replies | |
| 13/14 | Remove now unused fd_read_poll and all its only left uservl.c | +1 | 0 replies | |
| 14/14 | Add qemu_remove_fd_handler()audio/ audio/ hw/ +12 more | +48 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [Qemu-devel] [PATCH v2 00/14] Clear fd handlers
in this v2 series:
- a pony for malc:
23 files changed, 133 insertions(+), 215 deletions(-)
- a pony for Anthony
fd_read_poll is no more.
- tap/qemu-char* poll users are gone. I just folded the poll function on top of the read one. Anyone knows of a different reason that legacy for having a poll function? Only difference should be that we are calling select with more descriptors.
- rename qemu_clear_fd_handler() to qemu_remove_fd_handler() It removes it from a list, don't clear anything.
- now that pull function is gone, and remove of handler is a diffrent function, only one NULL is used by function -> no more qemu_set_fd_{read,write,poll}_handler, just old qemu_set_fd_handler.
Monitor works, and tap works. I don't know if there is any performance difference at all. Could anyone that has a setup to meassure it test it?
Later, Juan.
v1 series :
- convert io_handlers to one QLIST
- once there, qemu_set_fd_handlers2() has lots of arguments that are a lot of times NULL. Introduce a set of functions to not have to pass NULL values.
- qemu_clear_fd_handlers(): remove it
- qemu_set_fd_read_handler(): only read
- qemu_set_fd_write_handler(): only write
- qemu_set_fd_rw_handler(): read/write
- qemu_set_fd_poll_handler(): it was only used for reads and in qemu-char.c.
- once there fix bt that don't need poll at all (having a poll function that always return true is the equivalent of not having one).
- remove cast to (void *)(unsigned long) for things that already were pointers
- IOCanRWHandler is only used for reads -> rename it (almost no users).
Juan Quintela (14):
Convert io handlers to QLIST
remove useless cast
rename IOCanRWHandler to IOCanReadHandler
bt: remove bt_host_read_poll()
Handle deleted IOHandlers in a single buffer
tap: insert tap_can_send() into tap_send() qemu-char:stdio insert poll call into read one qemu-char:tcp insert poll call into read one qemu-char:fd insert poll call into read one qemu-char:pty insert poll call into read one qemu-char:udp insert poll call into read one Remove qemu_set_fd_handler2()
Remove now unused fd_read_poll and all its only left user Add qemu_remove_fd_handler()
aio.c | 2 +- audio/alsaaudio.c | 4 +- audio/ossaudio.c | 6 +- bt-host.c | 9 +---- hw/xen_backend.c | 4 +- migration-exec.c | 7 +-- migration-fd.c | 5 +- migration-tcp.c | 10 ++-- migration-unix.c | 10 ++-- migration.c | 8 ++-- net/socket.c | 6 +- net/tap.c | 27 ++++-------- net/vde.c | 2 +- qemu-aio.h | 4 +- qemu-char.c | 112 ++++++++++++++++---------------------------------- qemu-char.h | 11 +---- qemu-common.h | 2 +- qemu-tool.c | 9 ++-- usb-linux.c | 2 +- vl.c | 92 +++++++++++++++++------------------------- vnc-auth-sasl.c | 2 +- vnc-auth-vencrypt.c | 2 +- vnc.c | 12 +++--- 23 files changed, 133 insertions(+), 215 deletions(-)