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

Re: [Xen-devel] [PATCH 11/16] xen: sched: on Credit2, don't reprogram the timer if idle



On Fri, Mar 18, 2016 at 7:05 PM, Dario Faggioli
<dario.faggioli@xxxxxxxxxx> wrote:
> as other schedulers are doing already: if the idle vcpu
> is picked and scheduled, there is no need to reprogram the
> scheduler timer to fire and invoke csched2_schedule()
> again in future.
>
> Tickling or external events will serve as pokes, when
> necessary, but until we can, we should just stay idle.
>
> Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
> Reported-by: Tianyang Chen <tiche@xxxxxxxxxxxxxx>
> Suggested-by: George Dunlap <dunlapg@xxxxxxxxx>

This should be my work address (george.dunlap@xxxxxxxxxx).  With that change:

Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx>

> ---
> Cc: George Dunlap <dunlapg@xxxxxxxxx>
> Cc: Tianyang Chen <tiche@xxxxxxxxxxxxxx>
> ---
>  xen/common/sched_credit2.c |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
> index 2fd4175..4ff26c9 100644
> --- a/xen/common/sched_credit2.c
> +++ b/xen/common/sched_credit2.c
> @@ -1540,8 +1540,12 @@ csched2_runtime(const struct scheduler *ops, int cpu, 
> struct csched2_vcpu *snext
>      struct csched2_runqueue_data *rqd = RQD(ops, cpu);
>      struct list_head *runq = &rqd->runq;
>
> +    /*
> +     * If we're idle, just stay so. Others (or external events)
> +     * will poke us when necessary.
> +     */
>      if ( is_idle_vcpu(snext->vcpu) )
> -        return CSCHED2_MAX_TIMER;
> +        return -1;
>
>      /* General algorithm:
>       * 1) Run until snext's credit will be 0
>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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