Re: [PATCH][KVM][retry 1] Add support for Pause Filtering to AMD SVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Avi Kivity <avi@xxxxxxxxxx> wrote:

>>  +static int pause_interception(struct vcpu_svm *svm, struct kvm_run 
>> *kvm_run)
>> +{
>> +	/* Simple yield */
>> +	vcpu_put(&svm->vcpu);
>> +	schedule();
>> +	vcpu_load(&svm->vcpu);
>> +	return 1;
>> +
>
> Ingo, will this do anything under CFS, or will CFS note that 
> nothing has changed in the accounting and reschedule us 
> immediately?

The scheduler will yield to another task only if the current task 
has become ineligible. I.e schedule() is largely a NOP on 
TASK_RUNNING tasks (i.e. here).

I.e. this is a somewhat poor solution as far as scheduling goes. But 
i'm wondering what the CPU side does. Can REP-NOP really take 
thousands of cycles? If yes, under what circumstances?

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux