From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laszlo Ersek Subject: Re: [PATCH] remove blocked time accounting from xen "clockchip" Date: Thu, 20 Oct 2011 17:02:41 +0200 Message-ID: <4EA03811.5090502@redhat.com> References: <1318970579-6282-1-git-send-email-lersek@redhat.com> <4E9E9D97020000780005C1DE@nat28.tlf.novell.com> <4EA031B0.2010400@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4EA031B0.2010400@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , Jeremy Fitzhardinge Cc: xen-devel@lists.xensource.com, Joe Jin , Zhenzhong Duan , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On 10/20/11 16:35, Laszlo Ersek wrote: > I'm convinced the patch is correct, and only the commit message might > need a small fix (mentioning cpu_idle()). I forgot to say that I also added counters to xen_timer_interrupt(), account_idle_ticks() (called from cpu_idle()), and the idle time branch of account_process_tick(). (The last one is reached from xen_timer_interrupt() via event_handler == &tick_nohz_handler, after highres=off was passed). When the VM was left alone, they were increasing in strict lock-step. account_idle_time() <- account_idle_ticks() <- tick_nohz_restart_sched_tick() <- cpu_idle() <- account_process_tick() <- update_process_times() <- tick_nohz_handler() [highres=off] <- xen_timer_interrupt() <- (tick_periodic()) <- (tick_sched_timer()) The timer interrupt appears to kick cpu_idle(), and the latter accounts for the time spent idly. Laszlo