Carsten Otte wrote: > Avi Kivity wrote: >> If the eventfd patchset is merged, then file descriptors will become >> the standard Linux handle type, and poll (or rather, epoll) will >> become the standard way of waiting for something to happen. But of >> course if you come up with something better we'll use that. > Triggered by this discussion, I have spent quite some time thinking > about signaling, idle cpus, interrupts, signal processor (read: IPI) > and such lately. It has become clear to me, that sleeping in userspace > has been a bad design point I've made. The way kvm deals with this > (idle cpu thread sleeps interruptible in kernel) is clearly preferable.
kvm doesn't do this directly. A hlt instruction (which is is used on x86 to signal an idle cpu) is trapped and echoed to userspace, which then sleeps using select(2). We thought of having hlt sleep in the kernel, but that meant that we would need to specify the exit conditions from sleep (signals, fd readiness, aio readiness). (I think you're comparing to your pthread way of sleeping and waking, just making sure we're all on the same page here) -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel