On 10/21/15 2:46 PM, Paolo Bonzini wrote:
On 21/10/2015 00:57, Wanpeng Li wrote:
kvm_sched_out and kvm_sched_in are part of KVM's preemption hooks. The
hooks are registered only between vcpu_load and vcpu_put, therefore they
know that the mutex is taken. The sequence will go like this:
On 21/10/2015 19:21, Yacine HEBBAL wrote:
> If I correctly understood you last paragraph, it is better to use vm_ioctl
> to do generic processing that doesn't rely on a given VCPU and hence I won't
> need to use "CPU_FOREACH, run_on_cpu and current_cpu".
Right. On the other hand, you
Paolo Bonzini redhat.com> writes:
>
>
> On 21/10/2015 12:17, Hebbal Yacine wrote:
> > Thanks for the explanation, it's very clear.
> > I tired that but I didn't succeed to send the ioctl from "run_on_cpu"
> > function, I didn't find how to set the right CPUStat
> > I've tried "current_cpu"
>
On 21/10/2015 00:57, Wanpeng Li wrote:
>> kvm_sched_out and kvm_sched_in are part of KVM's preemption hooks. The
>> hooks are registered only between vcpu_load and vcpu_put, therefore they
>> know that the mutex is taken. The sequence will go like this:
>>
>> vcpu_load
>>
Paolo Bonzini redhat.com> writes:
>
>
> On 21/10/2015 00:57, Wanpeng Li wrote:
> >> kvm_sched_out and kvm_sched_in are part of KVM's preemption hooks. The
> >> hooks are registered only between vcpu_load and vcpu_put, therefore they
> >> know that the mutex is taken. The sequence will go
On 21/10/2015 12:17, Hebbal Yacine wrote:
> Thanks for the explanation, it's very clear.
> I tired that but I didn't succeed to send the ioctl from "run_on_cpu"
> function, I didn't find how to set the right CPUStat
> I've tried "current_cpu"
Current_cpu is always NULL outside the VCPU thread.
ock at all (logs here: http://pastebin.com/h5XNNMcb).
So, what I want to know is: what is the difference between vcpu_load and
kvm_sched_in ? both of this functions call kvm_arch_vcpu_loadbut the latter
one does it without doing a mutex
Is there a problem in using kvm_sched_in instead of vcpu_load
).
>
> So, what I want to know is: what is the difference between vcpu_load and
> kvm_sched_in ? both of this functions call kvm_arch_vcpu_loadbut the latter
> one does it without doing a mutex
kvm_sched_out and kvm_sched_in are part of KVM's preemption hooks. The
hooks are registered onl
m/h5XNNMcb).
So, what I want to know is: what is the difference between vcpu_load and
kvm_sched_in ? both of this functions call kvm_arch_vcpu_loadbut the latter
one does it without doing a mutex
kvm_sched_out and kvm_sched_in are part of KVM's preemption hooks. The
hooks are registered only between