[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [RFC PATCH v1 2/6] sched: track time spent in hypervisor tasks
Hi Jan, Jan Beulich writes: > On 12.06.2020 02:22, Volodymyr Babchuk wrote: >> In most cases hypervisor code performs guest-related jobs. Tasks like >> hypercall handling or MMIO access emulation are done for calling vCPU >> so it is okay to charge time spent in hypervisor to the current vCPU. >> >> But, there are also tasks that are not originated from guests. This >> includes things like TLB flushing or running tasklets. We don't want >> to track time spent in this tasks to a total scheduling unit run >> time. So we need to track time spent in such housekeeping tasks >> separately. >> >> Those hypervisor tasks are run in do_softirq() function, so we'll >> install our hooks there. > > I can see the point and desire, but it feels like you're moving from > one kind of unfairness to another: A softirq may very well be on > behalf of a specific vCPU, in which case not charging current should > lead to charging that specific one (which may still be current then). > Even more than for TLB flushes this may be relevant for the cases > where (on x86) we issue WBINVD on behalf of a guest. I'm agree with you. Something similar we discussed with Dario, but in do_IRQ() context: we can determine for which CPU we are handling interrupt and we can charge that vcpu for the spent time. The same stands correct for cases that you described: for some soft irqs there is a known benefactor, so we can charge it for the spent time. I and Dario agreed to implement this in the second stage. I'm working on the next version of the patches and I'll look at this more closely. There is a possibility that I'll introduce that feature. But I'll need some help from you or some other x86 expert. Anyways, are you okay with the general approach? We will work out the details, but I want to be sure that I'm moving in the right direction. -- Volodymyr Babchuk at EPAM
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |