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

Re: [Xen-devel] [PATCH 05/24] xen: credit2: make tickling more deterministic



On 05/09/16 14:47, Dario Faggioli wrote:
On Wed, 2016-08-31 at 18:10 +0100, anshul makkar wrote:
On 17/08/16 18:18, Dario Faggioli wrote:

@@ -1266,6 +1272,7 @@ csched2_alloc_vdata(const struct scheduler
*ops, struct vcpu *vc, void *dd)
           ASSERT(svc->sdom != NULL);
           svc->credit = CSCHED2_CREDIT_INIT;
           svc->weight = svc->sdom->weight;
+        svc->tickled_cpu = -1;
           /* Starting load of 50% */
           svc->avgload = 1ULL << (CSCHED2_PRIV(ops)-
load_precision_shift - 1);
           svc->load_last_update = NOW() >>
LOADAVG_GRANULARITY_SHIFT;
@@ -1273,6 +1280,7 @@ csched2_alloc_vdata(const struct scheduler
*ops, struct vcpu *vc, void *dd)
       else
       {
           ASSERT(svc->sdom == NULL);
+        svc->tickled_cpu = svc->vcpu->vcpu_id;
If I understood correctly, tickled_cpu refers to pcpu and not a
vcpu.
Saving vcpu_id in tickled_cpu looks wrong.

Yes, and in fact, as you can see in the previous hunk, for pretty much
all vcpus, tickled_cpu is initialized to -1.

Here, we are dealing with the vcpus of the idle domain. And for vcpus
of the idle domain, their vcpu id is the same as the id of the pcpu
they're associated to.
Ah, that makes it clear .

I agree it looks a little bit weird, but it's both correct, and the
easiest and cleanest way for initializing this.

I guess I can add a comment...
That will be useful.

Thanks and Regards,
Dario

Thanks
Anshul

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

 


Rackspace

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