Dong, Eddie wrote: > Anthony Liguori wrote: > >> Dong, Eddie wrote: >> >>> In this case, IOCTL return to Qemu will trigger scheduling at least. >>> >>> >> I think a scheduling change won't happen until the next timer tick. >> AFAICT, there's nothing explicit in the ioctl return path that will >> result in rescheduling. >> > > Do u mean Linux system call (IOCTL here) will not do scheudling check? > (check TIF_NEED_RESCHED flag) >
Walking through the syscall path, I don't see any place where it would explicity check for rescheduling. That seems logical to me too since the only time you should invoke the scheduler is after a timer interrupt or within a long running task that would have pre-emption disabled (which is what I think KVM qualifies as). > Also another chance is vcpu_put() in kvm_vcpu_ioctl_run that > will trigger rescheduling check IMO. > The fast path of vcpu_put() is mutex_unlock which assuming noone is waiting on the mutex to be unlocked is just an atomic increment. I'm not entirely sure if the waking up in the slow path will explicitly trigger a rescheduling. Regards, Anthony Liguori > Thx, eddie > > ------------------------------------------------------------------------- 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