From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [v3 25/26] KVM: Suppress posted-interrupt when 'SN' is set Date: Fri, 19 Dec 2014 13:00:37 +0100 Message-ID: <54941365.60604@redhat.com> References: <1418397300-10870-1-git-send-email-feng.wu@intel.com> <1418397300-10870-26-git-send-email-feng.wu@intel.com> <5491C0A2.7040503@redhat.com> <5492926E.8070207@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" To: Yang Zhang , "Wu, Feng" , Paolo Bonzini , KVM list Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: kvm.vger.kernel.org On 19/12/2014 06:25, Zhang, Yang Z wrote: > I see your point. But from performance point, if we can schedule the > vCPU to another PCPU to handle the interrupt, it would helpful. But I > remember current KVM will not schedule the vCPU in run queue (even > though it got preempted) to another pCPU to run(Am I right?). So it > may hard to do it. Yes. If the vCPU is in the run queue, it means it exhausted its quantum. As Feng said, the scheduler can decide to migrate it to another pCPU, or it can decide to leave it runnable but not start it. KVM doesn't try to force the scheduler one way or the other. If the vCPU is I/O bound, it will not exhaust its quantum and will not be preempted. It will block, and the wakeup vector will restart it. I don't think urgent notifications are interesting. If you want to do real time work, pin the vCPU to a physical CPU, and isolate the pCPU with isolcpus. Then the vCPU will always be running. Paolo