From: "Jan Beulich" Subject: Re: [PATCH 1/5] x86: allow specifying the NUMA nodes Dom0 should run on Date: Fri, 27 Feb 2015 15:04:59 +0000 Message-ID: <54F095AB0200007800064B3C@mail.emea.novell.com> References: <54EF315902000078000640FF@mail.emea.novell.com> <54EF3348020000780006413C@mail.emea.novell.com> <1424970840.4742.228.camel@citrix.com> <54F03CE0020000780006472F@mail.emea.novell.com> <1425031468.10194.43.camel@citrix.com> <54F05A0C0200007800064878@mail.emea.novell.com> <1425048895.10194.108.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YRMTN-0003Dp-97 for xen-devel@lists.xenproject.org; Fri, 27 Feb 2015 15:05:01 +0000 In-Reply-To: <1425048895.10194.108.camel@citrix.com> Content-Disposition: inline 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: "Keir (Xen.org)" , IanCampbell , Andrew Cooper , "Tim (Xen.org)" , Ian Jackson , "xen-devel@lists.xenproject.org" List-Id: xen-devel@lists.xenproject.org >>> On 27.02.15 at 15:54, wrote: > On Fri, 2015-02-27 at 10:50 +0000, Jan Beulich wrote: >> >>> On 27.02.15 at 11:04, wrote: >> > On Fri, 2015-02-27 at 08:46 +0000, Jan Beulich wrote: >> >> I'm simply adjusting what sched_init_vcpu() did, which is alter >> >> hard affinity conditionally on is_pinned and soft affinity >> >> unconditionally. >> >> >> > Ok, I understand the idea behing this better now, thanks. >> > [...] >> > Setting soft affinity as a superset of (in the former case) or equal to >> > (in the latter) hard affinity is just pure overhead, when in the >> > scheduler. >> >> The why does sched_init_vcpu() do what it does? If you want to >> alter that, I'm fine with altering it here. >> > It does that, but, in there, soft affinity is unconditionally set to > 'all bits set'. Then, in the scheduler, if we find out that the the soft > affinity mask is fully set, we just skip the soft affinity balancing > step. > > The idea is that, whether the mask is full because no one touched this > default, or because it has been manually set like that, there is nothing > to do at the soft affinity balancing level. > > So, you actually are right: rather that not touch soft affinity, as I > said in the previous email, I think we should set hard affinity > conditionally to is_pinned, as in the patch, and then unconditionally > set soft affinity to all, as in sched_init_vcpu(). I.e. effectively not touching it anyway (because just before it got set to "all" by sched_init_vcpu()). I guess instead of removing the line, I'll put it in a comment. Jan