From: Ian Jackson Subject: Re: [v10][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM Date: Tue, 21 Jul 2015 13:33:37 +0100 Message-ID: <21934.15393.528332.534956@mariner.uk.xensource.com> References: <1437373023-14884-1-git-send-email-tiejun.chen@intel.com> <1437373023-14884-12-git-send-email-tiejun.chen@intel.com> <21932.63595.566823.211293@mariner.uk.xensource.com> <21934.8684.318670.874156@mariner.uk.xensource.com> <55AE272A.4020306@intel.com> <21934.10490.615041.203428@mariner.uk.xensource.com> <55AE2BB1.9030604@intel.com> <21934.11410.844215.554291@mariner.uk.xensource.com> <55AE30D4.8000009@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55AE30D4.8000009@intel.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: "Chen, Tiejun" Cc: Stefano Stabellini , Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Chen, Tiejun writes ("Re: [v10][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM"): > [Ian Jackson:] > > The most obvious answer to me would be that if an rdms array is > > specified, the strategy should be ignored. That is how the automatic > > numa placement API works. > > I'm not familiar with this. > > Do you mean this? > > if (d_config->num_rdms) > strategy = LIBXL_RDM_RESERVE_STRATEGY_IGNORE; > > But except this global strategy, we also have per-device setting so > maybe something like this? > > if (d_config->num_rdms) > return 0; This latter was the kind of approach I had in mind. I think that will do for 4.6. > > But another answer would be to take the union of the specified > > regions. That would be more complicated, because the union would have > > to be computed. > > > >> if (d_config->rdms[i].start == rdm_start) > >> return; > > > > That doesn't, of course, compute the union. > > Sorry I don't understand what the "take the union of the specified > regions" is here. A "region" is a subset of the address space. I meant the set union: https://en.wikipedia.org/wiki/Union_%28set_theory%29 That is, an address would be reserved if it was reserved in any of the rdm regions implied by the config. The explicitly specified regions might overlap with the computed ones, without being identical. Computing the union would not be entirely trivial. Ian.