[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands
From: |
Jamie Lokier |
Subject: |
Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands |
Date: |
Sat, 11 Jul 2009 02:12:28 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Avi Kivity wrote:
> >That misses the point though. We process one command at a time in the
> >monitor so we only need to buffer one fd at a time. When we start to
> >process multiple commands at once in the monitor, we'll do so with
> >multiple monitor states and we'll want to have one fd per monitor state.
>
> Again I'm thinking of the client. If two client threads issue commands
> in parallel there'd be >1 fds on the wire. But qemu can consume them
> sequentially so I agree queue may hold just a single fd.
No, even though QEMU processes commands sequentially.
If the client sends
"command_1_with_fd" + FD1
"command_2_with_fd" + FD2
and then waits for the results of commands 1 and 2,
QEMU calls recvmsg() and will read
"command_1_with_fd\r\ncommand_2_with_fd\r\n" + FD1 + FD2
unless QEMU is consuming only one byte at a time from the socket, and
dispatching commands as soon as it sees the line terminator.
If QEMU reads more than one byte at a time, and the client sends more
than one command without waiting for the previous one's result, QEMU
needs to buffer more FDs otherwise some will get lost.
-- Jamie
- [Qemu-devel] [PATCH 5/5] Add support for fd=name to tap and socket networking, (continued)
- [Qemu-devel] [PATCH 5/5] Add support for fd=name to tap and socket networking, Mark McLoughlin, 2009/07/08
- Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands, Avi Kivity, 2009/07/08
- Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands, Mark McLoughlin, 2009/07/08
- Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands, Avi Kivity, 2009/07/08
- Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands, Anthony Liguori, 2009/07/08
- Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands, Avi Kivity, 2009/07/08
- Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands, Anthony Liguori, 2009/07/08
- Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands, Avi Kivity, 2009/07/08
- Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands, Anthony Liguori, 2009/07/08
- Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands, Avi Kivity, 2009/07/08
- Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands,
Jamie Lokier <=
- Re: [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands, Mark McLoughlin, 2009/07/21
- [Qemu-devel] [PATCH] Make tcp_chr_read() use recvmsg(), Mark McLoughlin, 2009/07/21
- Re: [Qemu-devel] [PATCH] Make tcp_chr_read() use recvmsg(), Blue Swirl, 2009/07/21
- Re: [Qemu-devel] [PATCH] Make tcp_chr_read() use recvmsg(), Jamie Lokier, 2009/07/21
- Re: [Qemu-devel] [PATCH] Make tcp_chr_read() use recvmsg(), Mark McLoughlin, 2009/07/22
- [Qemu-devel] [PATCH 1/5] Make tcp_chr_read() use recvmsg(), Mark McLoughlin, 2009/07/22
- [Qemu-devel] [PATCH 5/5] Add support for fd=name to tap and socket networking, Mark McLoughlin, 2009/07/22
- Re: [Qemu-devel] [PATCH 5/5] Add support for fd=name to tap and socket networking, Mark McLoughlin, 2009/07/23
- [Qemu-devel] [PATCH 4/5] Add monitor_get_fd() command for fetching named fds, Mark McLoughlin, 2009/07/22
- [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands, Mark McLoughlin, 2009/07/22