From: Anthony L. <an...@co...> - 2008-05-12 15:11:58
|
Avi Kivity wrote: >> Now the VCPU threads never select so the whole loop can be simplified >> to a single sigtimedwait() that always blocks. >> >> In reality, I don't think sigtimedwait() is really needed/useful for >> VCPUs anymore. We only use it to catch SIG_IPI and we only use >> SIG_IPI to break out of sleeping. I don't see any reason why we >> couldn't switch over to using a file descriptor for notification (or >> a pthread condition). > > How would you stop a vcpu running in guest mode? Yeah, I forgot about that. >> In the very least, we could just select() on nothing and allow >> SIG_IPI to break us out of the select. > > sigtimedwait() (or just sigwait, now) doesn't require the signal to be > delivered, so it's faster. Yeah, sigtimedwait() is probably the right thing to do since we have to use a signal for IPI. Regards, Anthony Liguori > If there's nothing to select, why call select()? > |