From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH 2/3] libxl: automatically set soft affinity after vnuma info Date: Tue, 24 Mar 2015 15:23:54 +0000 Message-ID: <20150324152354.GG30219@zion.uk.xensource.com> References: <20150324132630.10874.78040.stgit@Solace.station> <20150324134155.10874.85362.stgit@Solace.station> <20150324143259.GB30219@zion.uk.xensource.com> <1427209581.2560.209.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1427209581.2560.209.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli Cc: Ian Jackson , Wei Liu , Ian Campbell , Stefano Stabellini , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, Mar 24, 2015 at 03:06:24PM +0000, Dario Faggioli wrote: > On Tue, 2015-03-24 at 14:32 +0000, Wei Liu wrote: > > On Tue, Mar 24, 2015 at 02:42:15PM +0100, Dario Faggioli wrote: > > > More specifically, vcpus are assigned to a vnode, which in > > > turn is associated with a pnode. If a vcpu does not have any > > > soft affinity, automatically build up one, matching the pcpus > > > of the said pnode. > > > > > > > What about hard affinity? Do we need to generate hard affinity map as > > well? What's your thought on this? > > > I think we should not do that. Hard affinity has a bigger impact on the > system performance and overall configuration than soft, which is really > just a preference, so I would let the user deal with that explicitly. > > For example, setting the hard affinity to the same set of pcpus for > multiple domains could, depending on the system load, prevent some of > (the vcpus of) these domain to be able to execute for quite some time, > while there are idle pcpus in the system. This may well be something the > user wants, but I'd let him say so, if that is the case, rather than > automatically setup things like that for everyone! By only affecting > soft affinity, that doesn't happen, and we stay work conserving by > default, which is important. > > Also, only touching soft affinity is exactly what automatic NUMA > placement already does, which in turn is consistent with using the > result of placement to influence the domain's node affinity (i.e., what > Xen 4.3 and 4.4 do, since soft affinity was not there), and it is the > best solution, IMO. > > Perhaps we can have another config option, telling whether one wants > vnuma (and/or automatic placement) to affect soft or hard affinity (or > both). I'm not sure how much this would be useful, while it would > certainly make things more complex from both the implementation and the > interface point of view (the latter being the more concerning aspect). > In any case, we can add this at any point in future, if we feel it could > be useful, and I still think the default setting --if such option is not > specified-- should remain "affect soft affinity only". Right. Thanks for the explanation. Regarding new option, we can add it later if it turns out to be necessary. Acked-by: Wei Liu > > > The code itself looks good to me. > > > Thanks for looking at it. :-) > > Regards, > Dario