From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laszlo Ersek Subject: Re: [PATCH] remove blocked time accounting from xen "clockchip" Date: Wed, 19 Oct 2011 16:54:29 +0200 Message-ID: <4E9EE4A5.60904@redhat.com> References: <1318970579-6282-1-git-send-email-lersek@redhat.com> <4E9E9D97020000780005C1DE@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4E9E9D97020000780005C1DE@nat28.tlf.novell.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 Cc: Jeremy Fitzhardinge , xen-devel@lists.xensource.com, Joe Jin , Zhenzhong Duan , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On 10/19/11 09:51, Jan Beulich wrote: >>>> On 18.10.11 at 22:42, Laszlo Ersek wrote: >> ... because the "clock_event_device framework" already accounts for idle >> time through the "event_handler" function pointer in >> xen_timer_interrupt(). > > As event_handler is being checked to be non-zero, shouldn't the > code you remove simply become conditional (upon event_handler > being zero)? I think that wouldn't be hard to implement, but I'm afraid the paragraph you quoted from my proposed commit message could be wrong -- perhaps it's not the event_handler callback that cranks the idle time counter. Please see https://bugzilla.redhat.com/show_bug.cgi?id=624756#c26 In short, (a) idle time is increased in cpu_idle(), which seems to be running as a standalone kernel thread; (b) the event_handler I found invoked from xen_timer_interrupt() is hrtimer_interrupt(); (c) I couldn't figure out if cpu_idle() keeps waking up "on its own", or if it needs periodic kicks from hrtimer_interrupt() (executed by some other thread). Thank you Laszlo