[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC 1/9] schedule: Introduce per-pcpu time accounting
On Fri, 2020-05-29 at 10:48 +0200, Dario Faggioli wrote: > On Tue, 2020-05-26 at 02:27 +0000, Volodymyr Babchuk wrote: > > Hello All, > > > Hello Volodymyr, > Hi Dario, > > This is gentle reminder about this RFC. > > > > Sadly, Andrii Anisov has left our team. But I'm commited to continue > > his work on time accounting and real time scheduling. > > > Ok, so, first of all, sorry that this has not been properly addressed. > > I personally never forgot about it or anything... Still, I haven't been > able to look into it properly. > I see.. Anyways, thanks for the reply. Actually, I tried to not only rebase this patch series to the current mainline, but also to add x86 support. This gave me deeper unsterstanding of the inner workings. At least I hope so :) Anyways, I want to discuss the matter before continuing reworking the patches. The goal of those patches is to account guest time more precisely. Right now I can see only two main reasons, when guest can be charged for a time it dindn't used: interrupts and soft irqs. - do_softirq() is called every time we leave hypervisor mode. It is used to do housekeeping for the hypervisor itself. But, some random guest will charged for time spent in do_softirq() unless this function is not called on a idle vcpu. - also, pCPU can be interrupted by IRQ assigned to some other guest or to hypervisor itself. But time spent in interrupt handler will be charged for a guest being interrupted. So, basically, to account guest time correctly, we need to substract time spent in do_softirq() and in do_IRQ(). Actually, we can charge the correct guest for time spent in do_IRQ(), because handler code will eventually know target vCPU for the interrupt. There is technical problem with interrupt nesting. We will need some stack to track nesting correctly. But this is doable. Just for statistical purposes we can track hypervisor time somwhere, but it is not needed for scheduling decisions. Am I missing something?
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |