From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [v4][PATCH 11/19] tools: introduce some new parameters to set rdm policy Date: Wed, 01 Jul 2015 09:16:44 +0800 Message-ID: <55933F7C.2050607@intel.com> References: <1435053450-25131-1-git-send-email-tiejun.chen@intel.com> <1435053450-25131-12-git-send-email-tiejun.chen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Ian Jackson , Stefano Stabellini , Wei Liu , Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 2015/6/30 23:54, George Dunlap wrote: > On Tue, Jun 23, 2015 at 10:57 AM, Tiejun Chen wrote: >> @@ -1450,6 +1458,11 @@ static void domcreate_attach_pci(libxl__egc *egc, libxl__multidev *multidev, >> } >> >> for (i = 0; i < d_config->num_pcidevs; i++) { >> + /* >> + * If the rdm global policy is 'strict' we should override each device. >> + */ >> + if (d_config->b_info.rdm.reserve == LIBXL_RDM_RESERVE_FLAG_STRICT) >> + d_config->pcidevs[i].rdm_reserve = LIBXL_RDM_RESERVE_FLAG_STRICT; > > I think I'm missing something here. > > 1. By default, the domain policy is RELAXED (See above, > libxl__rdm_setdefault()). > > 2. By default, the policy for individual devices is STRICT (see > libxl_pci.c:libxl__device_pci_setdefault()) > > 3. If the domain policy is set to STRICT, this overrides per-device policy > > 4. If the domain policy is set to RELAXED, I don't see that having an > effect on individual devices This is our rule, and this is why I think you need to take a look at patch #00, our design and all patch head descriptions, "Default per-device RDM policy is 'strict', while default global RDM policy is 'relaxed'. When both policies are specified on a given region, 'strict' is always preferred." Thanks Tiejun > > If I'm correct, then #3 means it's not possible to have devices for a > domain *default* to strict, but to be relaxed in individual instances. > If you had five devices you wanted strict, and only one device you > wanted to be relaxed (because you knew it didn't matter), you'd have > to set reserved=strict for all the other devices, rather than just > being able to set the domain setting to strict and set reserve=relaxed > for the one. > > I think that both violates the principle of least surprise, and is less useful. > > Or did I miss something? > > -George >