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

Re: [Xen-devel] [PATCH v2 4/7] x86: add support for COS/CBM manangement



On Fri, Mar 20, 2015 at 05:13:44PM +0000, Jan Beulich wrote:
> >>> On 19.03.15 at 11:41, <chao.p.peng@xxxxxxxxxxxxxxx> wrote:
> > +static unsigned int get_socket_cpu(unsigned int socket)
> > +{
> > +    unsigned int cpu;
> > +
> > +    for_each_online_cpu ( cpu )
> > +       if ( cpu_to_socket(cpu) == socket )
> > +           return cpu;
> > +    return nr_cpu_ids;
> > +}
> 
> This can be a rather long loop for a huge system. I think you need to
> find some better solution for this.

Maintain a socket_cpu_map for each socket? Sounds no existed way.

> > +struct xen_domctl_psr_cat_op {
> > +#define XEN_DOMCTL_PSR_CAT_OP_SET_L3_CBM     0
> > +#define XEN_DOMCTL_PSR_CAT_OP_GET_L3_CBM     1
> > +    uint32_t cmd;       /* IN: XEN_DOMCTL_PSR_CAT_OP_* */
> > +    uint32_t target;    /* IN: socket or cpu to be operated on */
> 
> How can this be socket _or_ CPU?

This is for future feature like L2 cache which needs to specify cpu but
not socket. Perhaps not mention here to avoid confusing.

Chao

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