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

Re: [Xen-devel] [PATCH v2 12/16] libxl: get and set soft affinity

George Dunlap writes ("Re: [PATCH v2 12/16] libxl: get and set soft affinity"):
> On 14/11/13 15:11, Ian Jackson wrote:
> > So perhaps we should have a singe function that can change the
> > cpupool, hard affinity, and soft affinity, all at once ?
> I think this is probably a good idea.  Would it make sense to basically 
> have libxl_[gs]et_vcpuaffinity2(), which takes a parameter that can 
> specify that the mask is for either hard, soft, or both?

No, it needs to take at least two separate parameters for the hard and
soft masks, because the toolstack might want to set the hard affinity
and soft affinity to different values, without having to think
carefully about ordering these calls to avoid generating spurious
warnings and incompatible arrangements.

I think this probably applies to cpupool changes too.  So perhaps the
function should look a bit like setresuid or something: it should take
an optional new cpupool (is there a sentinel value that can be used to
mean "no change"?), an optional new soft mask, and an optional new
hard mask.

> > What if the application makes a call to change the cpupool, without
> > touching the affinities ?  Should the affinities be reset
> > automatically ?
> I think whatever happens for hard affinities right now should be carried on.

Maybe it is a bug that it doesn't do anything.  I think it depends how
we expect people to use this.  If a caller sets the hard affinities
and then changes the cpupool, are they supposed to always then set the
hard affinities again to a new suitable value ?


Xen-devel mailing list



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