Dong, Eddie wrote: > Avi: > > apic->lock is used in many place to avoid race condition with apic > timer call back > function which may run on different pCPU. This patch migrate the > apic timer to > same CPU with the one VP runs on, thus the lock is no longer > necessary. > > thx,eddie > >
What about preemption: - vcpu executes lapic code in qemu process context - process is preempted - timer fires, touches lapic code Furthermore, I question the necessity of this. Taking a spinlock is a couple dozen cycles on modern processors. Entering the guest is a couple thousand. So what are we saving? (migrating the timer is a good thing though). A different approach might be to wake up the vcpu like we do for irr, with kvm_vcpu_kick(), and let the timer code be handled in process context, so no locks need be taken. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel