From: "Jan Beulich" Subject: Re: Re: [PATCH] xen: always handle VIRQ_TIMER first. Date: Mon, 18 Oct 2010 14:20:14 +0100 Message-ID: <4CBC65AE020000780001DBC0@vpn.id2.novell.com> References: <4CBA937C.6060301@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4CBA937C.6060301@goop.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge , Keir Fraser Cc: xen-devel@lists.xensource.com, Ian Campbell List-Id: xen-devel@lists.xenproject.org >>> On 17.10.10 at 08:11, Jeremy Fitzhardinge wrote: > I think (but I haven't spelunked into that code lately) that after a > tickless idle period it will update jiffies N ticks based on the > clocksource, and then run any other interrupt handler code, so jiffies > will always appear to be up to date. >=20 > Ah, yes, here it is: >=20 > /** > * tick_nohz_update_jiffies - update jiffies when idle was interrupted > * > * Called from interrupt entry when the CPU was idle > * > * In case the sched_tick was stopped on this CPU, we have to check = if=20 > jiffies > * must be updated. Otherwise an interrupt handler could use a stale = jiffy > * value. We do this unconditionally on any cpu, as we don't know = whether=20 > the > * cpu, which has the update task assigned is in a long sleep. > */ > static void tick_nohz_update_jiffies(ktime_t now) > { > ... > } But this is available only with CONFIG_NO_HZ, which is a freely selectable option. So perhaps the code should still be added inside an #ifndef CONFIG_NO_HZ? Jan