From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Keir Fraser <keir@xen.org>
Cc: xen-devel@lists.xensource.com, Ian Campbell <ian.campbell@citrix.com>
Subject: Re: Re: [PATCH] xen: always handle VIRQ_TIMER first.
Date: Sat, 16 Oct 2010 23:11:08 -0700 [thread overview]
Message-ID: <4CBA937C.6060301@goop.org> (raw)
In-Reply-To: <C8DF0F4F.262B3%keir@xen.org>
On 10/16/2010 12:14 AM, Keir Fraser wrote:
> On 15/10/2010 22:11, "Jeremy Fitzhardinge" <jeremy@goop.org> wrote:
>
>>> When guest resumes execution after a long period blocked, the unblocking
>>> interrupt may be handled before the inevitable timer interrupt which
>> Why "inevitable"? What if the next timer event is still some time in
>> the future? Or are you assuming the timer is driven by the default Xen
>> 100Hz timer?
> Do you sometimes disable, or indeed never use, VCPUOP_set_periodic_timer?
I disable it ASAP at boot and always use VCPUOP_set_singleshot_timer
from then on.
> Hmmm... Perhaps as you suggest this would be a generic issue with any
> tickless kernel, and the correct upstream fix for issues such as USB kbd
> repeat -- if indeed such issues still exist -- is to fix such hardirq
> handlers to not depend on jiffies.
>
> We fixed it the way we did in 'classic Xen' patched kernels since it seemed
> arhitecturally neatest. I can accept that in the tickless kernel world that
> may not actually be true.
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.
Ah, yes, here it is:
/**
* 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 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 the
* cpu, which has the update task assigned is in a long sleep.
*/
static void tick_nohz_update_jiffies(ktime_t now)
{
...
}
J
next prev parent reply other threads:[~2010-10-17 6:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-15 10:52 [PATCH] xen: always handle VIRQ_TIMER first Ian Campbell
2010-10-15 17:18 ` Jeremy Fitzhardinge
2010-10-15 18:30 ` Keir Fraser
2010-10-15 21:11 ` Jeremy Fitzhardinge
2010-10-16 6:48 ` Ian Campbell
2010-10-16 7:14 ` Keir Fraser
2010-10-17 6:11 ` Jeremy Fitzhardinge [this message]
2010-10-17 7:38 ` Keir Fraser
2010-10-18 13:20 ` Jan Beulich
2010-10-18 16:52 ` Jeremy Fitzhardinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CBA937C.6060301@goop.org \
--to=jeremy@goop.org \
--cc=ian.campbell@citrix.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.