Re: [PATCH v2 2/3] KVM: x86: Include host suspended time in steal time.

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

 



On Tue, Aug 20, 2024 at 1:38 PM Suleiman Souhlal <suleiman@xxxxxxxxxx> wrote:
> @@ -3735,6 +3735,14 @@ static void record_steal_time(struct kvm_vcpu *vcpu)
>         steal += current->sched_info.run_delay -
>                 vcpu->arch.st.last_steal;
>         vcpu->arch.st.last_steal = current->sched_info.run_delay;
> +       /*
> +        * Include the time that the host was suspended in steal time.
> +        * Note that the case of a suspend happening during a VM migration
> +        * might not be accounted.
> +        */
> +       suspend_ns = kvm_total_suspend_ns();
> +       steal += suspend_ns - vcpu->arch.st.last_suspend_ns;
> +       vcpu->arch.st.last_suspend_ns = suspend_ns;
>         unsafe_put_user(steal, &st->steal, out);
>
>         version += 1;

There is an issue here: We are calling a function under UACCESS, which
raises an objtool warning.
I'll be sending a v3 with that addressed (and the function return
value wrapping in patch 1/3).

-- Suleiman





[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