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

Re: [Xen-devel] [PATCH v9 4/6] x86: enable CQM monitoring for each domain RMID



>>> On 19.02.14 at 07:32, Dongxiao Xu <dongxiao.xu@xxxxxxxxx> wrote:
> +void cqm_assoc_rmid(unsigned int rmid)
> +{
> +    uint64_t val;
> +    uint64_t new_val;
> +
> +    rdmsrl(MSR_IA32_PQR_ASSOC, val);
> +    new_val = (val & ~rmid_mask) | (rmid & rmid_mask);
> +    if ( val != new_val )
> +        wrmsrl(MSR_IA32_PQR_ASSOC, new_val);
> +}

Considering that even the addition of two RDMSRs in the context
switch path is relatively expensive, I think you will want to track the
most recently written value in a per-CPU variable.

Jan


_______________________________________________
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®.