Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-25 Thread Alexander Graf
On 22.02.2013, at 12:47, Paolo Bonzini wrote: > Il 22/02/2013 11:07, Laurent Desnogues ha scritto: >>> The g_poll(3) interface is a portable version of the poll(2) system call. >>> The difference to select(2) is that fine-grained events (G_IO_IN, G_IO_OUT, G_IO_HUP, G_IO_ERR, G_IO_PRI

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-22 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-22 Thread Paolo Bonzini
Il 22/02/2013 11:07, Laurent Desnogues ha scritto: >> The g_poll(3) interface is a portable version of the poll(2) system call. >> The >> > difference to select(2) is that fine-grained events (G_IO_IN, G_IO_OUT, >> > G_IO_HUP, G_IO_ERR, G_IO_PRI) can be monitored instead of just >> > read/write/e

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-22 Thread Laurent Desnogues
On Wed, Feb 20, 2013 at 11:28 AM, Stefan Hajnoczi wrote: > Amos Kong reported that file descriptors numbered higher > than 1024 could crash QEMU. This is due to the fixed size of the fd_set type > used for select(2) event polling. > > This series converts the main-loop.c and aio-posix.c select(2

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-22 Thread Jan Kiszka
On 2013-02-22 09:40, Stefan Hajnoczi wrote: > On Thu, Feb 21, 2013 at 05:29:25PM +0100, Jan Kiszka wrote: >> On 2013-02-21 16:33, Stefan Hajnoczi wrote: >>> On Thu, Feb 21, 2013 at 02:17:14PM +0100, Christian Borntraeger wrote: On 20/02/13 11:28, Stefan Hajnoczi wrote: > Amos Kong reporte

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-22 Thread Stefan Hajnoczi
On Thu, Feb 21, 2013 at 05:29:25PM +0100, Jan Kiszka wrote: > On 2013-02-21 16:33, Stefan Hajnoczi wrote: > > On Thu, Feb 21, 2013 at 02:17:14PM +0100, Christian Borntraeger wrote: > >> On 20/02/13 11:28, Stefan Hajnoczi wrote: > >>> Amos Kong reported that file descriptors numbered > >>> higher

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-21 Thread Anthony Liguori
Paolo Bonzini writes: > Il 21/02/2013 18:25, Anthony Liguori ha scritto: >>> > >>> > What would be more problematic is the chardev flow control patches, >>> > which use the glib main loop directly. I don't recall your KVM forum >>> > presentation---did you need RT prioritization of the serial po

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-21 Thread Jan Kiszka
On 2013-02-21 18:10, Paolo Bonzini wrote: > Il 21/02/2013 17:29, Jan Kiszka ha scritto: >> In this context, I'd like to recall a detail: Real-time prioritization >> of those I/O threads will most probably require locking with >> prio-inversion avoidance (*). In that case external libs without a >>

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-21 Thread Paolo Bonzini
Il 21/02/2013 18:25, Anthony Liguori ha scritto: >> > >> > What would be more problematic is the chardev flow control patches, >> > which use the glib main loop directly. I don't recall your KVM forum >> > presentation---did you need RT prioritization of the serial port too? > It uses GSources whi

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-21 Thread Anthony Liguori
Paolo Bonzini writes: > Il 21/02/2013 17:29, Jan Kiszka ha scritto: >> In this context, I'd like to recall a detail: Real-time prioritization >> of those I/O threads will most probably require locking with >> prio-inversion avoidance (*). In that case external libs without a >> chance to tune or

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-21 Thread Paolo Bonzini
Il 21/02/2013 17:29, Jan Kiszka ha scritto: > In this context, I'd like to recall a detail: Real-time prioritization > of those I/O threads will most probably require locking with > prio-inversion avoidance (*). In that case external libs without a > chance to tune or replace their internal locking

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-21 Thread Jan Kiszka
On 2013-02-21 16:33, Stefan Hajnoczi wrote: > On Thu, Feb 21, 2013 at 02:17:14PM +0100, Christian Borntraeger wrote: >> On 20/02/13 11:28, Stefan Hajnoczi wrote: >>> Amos Kong reported that file descriptors numbered higher >>> than 1024 could crash QEMU. This is due to the fixed size of the fd_se

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-21 Thread Paolo Bonzini
Il 21/02/2013 17:08, Laszlo Ersek ha scritto: > On 02/21/13 14:17, Christian Borntraeger wrote: >> On 20/02/13 11:28, Stefan Hajnoczi wrote: >>> Amos Kong reported that file descriptors numbered higher >>> than 1024 could crash QEMU. This is due to the fixed size of the fd_set >>> type >>> used

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-21 Thread Laszlo Ersek
On 02/21/13 14:17, Christian Borntraeger wrote: > On 20/02/13 11:28, Stefan Hajnoczi wrote: >> Amos Kong reported that file descriptors numbered higher >> than 1024 could crash QEMU. This is due to the fixed size of the fd_set type >> used for select(2) event polling. >> > > Good to see somebody

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-21 Thread Stefan Hajnoczi
On Thu, Feb 21, 2013 at 02:17:14PM +0100, Christian Borntraeger wrote: > On 20/02/13 11:28, Stefan Hajnoczi wrote: > > Amos Kong reported that file descriptors numbered higher > > than 1024 could crash QEMU. This is due to the fixed size of the fd_set > > type > > used for select(2) event pollin

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-21 Thread Christian Borntraeger
On 20/02/13 11:28, Stefan Hajnoczi wrote: > Amos Kong reported that file descriptors numbered higher > than 1024 could crash QEMU. This is due to the fixed size of the fd_set type > used for select(2) event polling. > Good to see somebody working on that. We have just faced this problem on s390

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-20 Thread Stefan Hajnoczi
On Wed, Feb 20, 2013 at 04:56:35PM +0200, Michael S. Tsirkin wrote: > On Wed, Feb 20, 2013 at 11:28:23AM +0100, Stefan Hajnoczi wrote: > > Amos Kong reported that file descriptors numbered higher > > than 1024 could crash QEMU. This is due to the fixed size of the fd_set > > type > > used for se

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-20 Thread Paolo Bonzini
Il 20/02/2013 15:56, Michael S. Tsirkin ha scritto: > > I have tested that the series builds and is bisectable on Linux and Windows > > hosts. But I have not done extensive testing on other host platforms or > > with > > long-term guests to check for performance regressions. > > Wouldn't it make

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-20 Thread Michael S. Tsirkin
On Wed, Feb 20, 2013 at 11:28:23AM +0100, Stefan Hajnoczi wrote: > Amos Kong reported that file descriptors numbered higher > than 1024 could crash QEMU. This is due to the fixed size of the fd_set type > used for select(2) event polling. > > This series converts the main-loop.c and aio-posix.c

Re: [Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-20 Thread Laszlo Ersek
On 02/20/13 11:28, Stefan Hajnoczi wrote: > v4: > * Assign revents instead of bitwise OR to make code clearer [Laszlo] > * Invoke pollfds_poll() only when select(2) succeeds [Laszlo] > * Fix gpollfds_to_select(select_ret || g_poll_ret) call [Laszlo] I compared v3 & v4 patch by patch. Series R

[Qemu-devel] [PATCH v4 00/10] main-loop: switch to g_poll(3) on POSIX hosts

2013-02-20 Thread Stefan Hajnoczi
Amos Kong reported that file descriptors numbered higher than 1024 could crash QEMU. This is due to the fixed size of the fd_set type used for select(2) event polling. This series converts the main-loop.c and aio-posix.c select(2) calls to g_poll(3). This eliminates the fd_set type and allows Q