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

Re: [Xen-devel] [PATCH v3 2/6] xen: sched: fix locking for insert_vcpu() in credit1 and RTDS



Hi Dario,

Thank you very much for the explanation! I got it. To be specific,

2015-11-04 10:52 GMT-05:00 Dario Faggioli <dario.faggioli@xxxxxxxxxx>:
On Wed, 2015-11-04 at 10:01 -0500, Meng Xu wrote:
> 2015-11-04 9:12 GMT-05:00 Dario Faggioli <dario.faggioli@xxxxxxxxxx>:
> > Just FTR (and for next time :-D), is the above something that can
> > be
> > interpreted as a 'Reviewed-by: Meng Xu <xxx>' ? If no (e.g.,
> > because
> > you haven't looking thoroughly enough to feel confident to express
> > it),
> > then fine, I was just asking.
> Thank you very much for explaining this for me. :-)
>
> I feel confident about the changes for RTDS scheduler.
>
Ok.

> I'm not so confident about the change in the schedule.c. To be
> specific, this patch removes insert_vcpu in schedule_cpu_switch() in
> schedule.c;
>
It removes the attempt of inserting the idle vCPU in the runqueue of
the scheduler of the target cpupool for the pCPU.

More specifically, this line:

 SCHED_OP(new_ops, insert_vcpu, idle);

âI neglected the parameter "idle"â here. :-)Â



If we look at the various ways in which insert_vcpu is implemented, we
have:

csched_vcpu_insert:

  if ( !__vcpu_on_runq(svc) && vcpu_runnable(vc) && !vc->is_running )
    __runq_insert(vc->processor, svc);

but the pCPU being switched is free, i.e., it is not in any cpupool,
and it is idling. So, the idle vCPU is running, and the condition above
is false, which means __runq_insert() is not really called.

csched2_vcpu_insert:

  if ( ! is_idle_vcpu(vc) )
  {
  Â...
  }

so trying to insert the idle vCPU is actually a nop.

rt_vcpu_insert:

  if ( is_idle_vcpu(vc) )
    return;
â
Â

a nop again.


Yes. :-) After seeing this, I recalled... :-D
Â
My point being that this patch actually removes nothing but a bunch of
if()-s, with no effect at all.

> I'm not so sure if it is ok to insert_vcpu when a domain is moved.

>
Hopefully, I addressed your doubts.

âYes. It clears my doubts. :-D

Â
Ok, I haven't sent v4 yet, so I'll apply it there. Thanks.


âThank you very much for your explanation!â
Â
â Now I'm confident aboutÂ

Reviewed-by: Meng Xu <mengxu@xxxxxxxxxxxxx

I saw the v4 patch series that comes with the Reviewed-by above. So I think you don't need to do anything.Â

Best regards,

Meng

-----------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
http://www.cis.upenn.edu/~mengxu/
_______________________________________________
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®.