Re: [Xen-devel] [PATCH v6 07/14] x86: dynamically get/set CBM for a domain

2015-04-24 Thread Jan Beulich
>>> On 23.04.15 at 11:55, wrote: > Changes in v5: > * Add spin_lock to protect cbm_map. > * Add spin_lock to read path aswell. I don't think the second bullet point is true - there's only a single spin_lock() invocation being added here afaics. Jan _

Re: [Xen-devel] [PATCH v6 07/14] x86: dynamically get/set CBM for a domain

2015-04-24 Thread Jan Beulich
>>> On 23.04.15 at 11:55, wrote: > +int psr_set_l3_cbm(struct domain *d, unsigned int socket, uint64_t cbm) > +{ > +unsigned int old_cos, cos; > +struct psr_cat_cbm *map, *find; I think the variable would better be named found and ... > +struct psr_cat_socket_info *info; > +int r

[Xen-devel] [PATCH v6 07/14] x86: dynamically get/set CBM for a domain

2015-04-23 Thread Chao Peng
For CAT, COS is maintained in hypervisor only while CBM is exposed to user space directly to allow getting/setting domain's cache capacity. For each specified CBM, hypervisor will either use a existed COS which has the same CBM or allocate a new one if the same CBM is not found. If the allocation f