From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: [PATCH 0/3] Automatically derive soft affinity from vnuma information Date: Tue, 24 Mar 2015 14:41:38 +0100 Message-ID: <20150324132630.10874.78040.stgit@Solace.station> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Wei Liu , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Hi, This small series is meant at achieving the following two goals: - when building a vnuma enabled guest, if any vcpu hard or soft affinity is specified, and that does not match with the vnuma configuration supplied (e.g., vcpu X, belonging to vnode Y on pnode W, has affinity with pcpus outside of pnode W), we want to warn the user about it; - when building a vnuma enabled guest, if no _soft_ affinity is specified, we want to automatically build it up, basing on the vnuma configuration supplied (e.g., vcpu X, belonging to vnode Y on pnode W will have soft affinity with pcpus of pnode W). IOW, with the following in the config file: vcpus = '4' memory = '2000' vnuma = [ [ "pnode=0","size=1000","vcpus=0-1","vdistances=10,20" ], [ "pnode=1","size=1000","vcpus=2-3","vdistances=20,10" ] ] We'll, automatically, end up with this: root@Zhaman:~# xl vcpu-list 1 Name ID VCPU CPU State Time(s) Affinity (Hard / Soft) test-pv 1 0 7 -b- 8.1 all / 0-7 test-pv 1 1 3 -b- 6.2 all / 0-7 test-pv 1 2 10 -b- 0.1 all / 8-15 test-pv 1 3 8 -b- 0.1 all / 8-15 While at it, I'm taking the chance (in patch #3) for doing some trivial cleanups. Thanks and Regards, Dario --- Dario Faggioli (3): libxl: check whether vcpu affinity and vnuma info match libxl: automatically set soft affinity after vnuma info libxl: cleanup some misuse of 'cpumap' as parameter tools/libxl/libxl_dom.c | 46 ++++++++++++++++++++++++++++++++++++++ tools/libxl/libxl_utils.h | 6 +++-- tools/libxl/libxl_vnuma.c | 54 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 4 deletions(-)