[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Scheduling and the periodic timer

On Fri, 2019-02-01 at 10:59 +0100, Juergen Gross wrote:
> On 01/02/2019 10:50, Jan Beulich wrote:
> > > > > On 01.02.19 at 08:26, <jgross@xxxxxxxx> wrote:
> > > 
> > > The periodic timer is used via VCPUOP_set_periodic_timer only,
> > > and
> > > today's Linux kernel isn't using it at all. So I guess this timer
> > > not
> > > really working as it should is no big issue.
> > 
> > Interesting. Our kernels have been using it until SLE11 SP1, as
> > did the old 2.6.18 one that all of our old kernels were derived
> > from. Yet the same code is present already in 3.2.0's schedule().
> > Are you sure this timer is meant to wake the vCPU at the set
> > rate, rather than just surfacing events if the vCPU is running?
> > Looking at vcpu_periodic_timer_work()'s calculation of the
> > next event time also suggests to me that there's no guarantee
> > that the event will indeed surface at the set rate.
> That's correct. The set rate just is the minimum time between two
> interrupts.
> The usability of such a timer is questionable in the best case IMO.
Yes, I vaguely recall discussing about this with someone, and the
outcome being <<Well, everyone should be using the single-shot timer
anyway, these days>>, and then we probably dropped the ball (I can't
find the thread right now, maybe it was on IRC). :-(

IAC, I do agree that it does not make any sense to stop the timer for
the vcpu being descheduled. And we really should either fix this... or
we can get just get rid of the timer entirely, as it's basically
delivering events at pseudo-random rate! :-O

I can look into that.

<<This happens because I choose it to happen!>> (Raistlin Majere)
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Software Engineer @ SUSE https://www.suse.com/

Attachment: signature.asc
Description: This is a digitally signed message part

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.