[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v11 05/23] x86: refactor psr: L3 CAT: implement Domain init/free and schedule flows.
>>> On 31.05.17 at 08:37, <yi.y.sun@xxxxxxxxxxxxxxx> wrote: > On 17-05-30 07:26:55, Jan Beulich wrote: >> >>> On 03.05.17 at 10:44, <yi.y.sun@xxxxxxxxxxxxxxx> wrote: >> > @@ -376,6 +412,14 @@ void psr_ctxt_switch_to(struct domain *d) >> > if ( psr_cmt_enabled() ) >> > psr_assoc_rmid(®, d->arch.psr_rmid); >> > >> > + /* IDLE domain's 'psr_cos_ids' is NULL so we set default value for >> > it. */ >> > + if ( psra->cos_mask ) >> > + psr_assoc_cos(®, >> > + d->arch.psr_cos_ids ? >> > + >> > d->arch.psr_cos_ids[cpu_to_socket(smp_processor_id())] : >> > + 0, >> >> As to the idle domain aspect - is there a strict need to write a new >> value for the idle domain at all? I.e. can't you just skip the write in >> that case, knowing you'll write a proper value anyway once the >> next non-idle vCPU gets scheduled here? Which then raises the >> question on d->arch.psr_cos_ids being NULL - is that strictly only >> possible for the idle domain, or are there also other cases? This >> determines how the if() condition should be re-written ... >> > I agree with you that IDLE domain can be skipped. But considering that some > domains' 'psr_cos_ids' may fail to be allocated, we have to set default value > for these domains. So, I think we should keep this but skip IDLE domain in > 'psr_ctxt_switch_to' caller. There don't need to be two conditionals, i.e. using the one here is fine. But the comment then shouldn't give the impression the idle domain is the only case to consider. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |