On Tue, 2017-03-14 at 09:26 +0100, Christoffer Dall wrote: > On Mon, Mar 13, 2017 at 06:28:16PM +0100, Radim Krčmář wrote: > > 2017-03-08 02:57-0800, Christoffer Dall: > > > Hi Paolo, > > > > > > I'm looking at improving KVM/ARM a bit by calling > > > guest_exit_irqoff > > > before enabling interrupts when coming back from the guest. > > > > > > Unfortunately, this appears to mess up my view of CPU usage using > > > something like htop on the host, because it appears all time is > > > spent > > > inside the kernel. > > > > > > From my analysis, I think this is because we never handle any > > > interrupts > > > before enabling interrupts, where the x86 code does its > > > handle_external_intr, and the result on ARM is that we never > > > increment > > > jiffies before doing the vtime accounting. > > > > (Hm, the counting might be broken on nohz_full then.) > > > > Don't you still have a scheduler tick even with nohz_full and > something > that will eventually update jiffies then? > With nohz_full, the housekeeping CPU will get a timer interrupt every single jiffy, and the jiffies variable will get updated HZ times a second.