qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Linux SIGIO handling changes


From: Anthony Liguori
Subject: Re: [Qemu-devel] Linux SIGIO handling changes
Date: Mon, 21 Apr 2008 10:43:25 -0500
User-agent: Thunderbird 2.0.0.12 (X11/20080227)

Avi Kivity wrote:
Anthony Liguori wrote:
Anders Melchiorsen wrote:
I am resending this patch, split into two parts now.

This cleans up SIGIO handling to improve latency:
- SIGALRM for alarm timers
- enable SIGIO on qemu_set_fd_handler2()

The issue was found in KVM, where it is much more visible,
because there is no periodic timer. However, it has been
confirmed (by Aurelien Jarno) that even for qemu, this
approach "improves network transfers in a huge way".

Please apply, or give a firm rejection so I can stop resending.

Probably the right thing to do is the direction KVM is moving toward, i.e. have a separate IO thread.

Setting SIGIO on every file descriptor is really just a hack to break out of the cpu exec loop. It's unclear to me whether it's really always the right thing to do for every file descriptor.


Even with a separate iothread one needs the signals, as there is no other race-free way to poll for both aio completions and fd readiness.

Unless you emulate signalfd() using a thread. FWIW, I've been thinking of implementing something similar to posix-aio (using a thread-pool for AIO) for QEMU to get a bit more control for this sort of thing.

posix-aio is a pretty unfortunate interface as it doesn't provide a mechanism to do asynchronous fdatasync() nor individual vector requests.

Regards,

Anthony Liguori

Regards,

Anthony Liguori

[well, pselect works, but I dislike it and it isn't present on all kernels]






reply via email to

[Prev in Thread] Current Thread [Next in Thread]