Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1084298ybi; Thu, 30 May 2019 11:18:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4t1rmksFmOoYtW4MgZg+Y3bBmO2BAhylQJwbXrDLJaQntZiMfpVCFmxJWlKYnQd8qblvl X-Received: by 2002:a17:902:824:: with SMTP id 33mr5082250plk.29.1559240329935; Thu, 30 May 2019 11:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559240329; cv=none; d=google.com; s=arc-20160816; b=GUh2eFK17PGW3sgp8V2lJSCm0e5AoxZBzx72QHY8XY4IIeK4jz8cHGifZR8wC7WHdO GKoyeAv3u1RbeEHJnhFRmfN9KGXUVnWjICR1sUayeOYJ9uTMvPJNxJTsLLdABTs4rzu2 bEKwVlUK8ahyuq6IMdrzM/gb1LURRzVWlQ79OIVVomrDAS4Zij+8wveDNG8yTmz0GjfF ebVbq/QetzCUb8pxC2qeEtgo9pa5tDk6AS0U09d1ljLi3QCjc0IePxx9/Q8On8M0f91X EdSmm1C3SQw2KY3K53MCCHmhBw65CzLuOogQ2kjx6p2pQEABi2sJ0+IDc6DbzZ6JcxBr 8mKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=+b8nf1vuSxnt+2L4Jc1+oUZDc4rfLPFwGfm8wfk97m8=; b=WuJDBjqRGwKSnLTtGzSt0Rod2/pXqZv1rSpvYCMiI1CLDoUKFPiTMUGA0YW3Ur5PrQ oKpn2ixMFcq6FC+4EjWwTKhL5Xm/f/IFfvLfmwN8fzcYrPxl9fGExTnIIlkRaBg5cfT4 WSOLMbNeWPrmxO4ayS/Qt+TU9jLVzZePhgUWZbIbnw7DBiGxppXhPyl5Wa/ORrVUpFyn LrOnje3UIGi/U3fWAEq5184ipSVW3mr6gTZGsvYIA6mcyc35kTsufuuXPLNMdSxlEMdr qbdto91L/P2OAaSCtTh1pDVgGSUPGAd9rUDYax3a98SJDPzQth+91i9t43OzoeD1shLa Qjmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6si3742564pgh.163.2019.05.30.11.18.33; Thu, 30 May 2019 11:18:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726724AbfE3SQB (ORCPT + 99 others); Thu, 30 May 2019 14:16:01 -0400 Received: from mga11.intel.com ([192.55.52.93]:32247 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726280AbfE3SQB (ORCPT ); Thu, 30 May 2019 14:16:01 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 May 2019 11:16:00 -0700 X-ExtLoop1: 1 Received: from rchatre-mobl.amr.corp.intel.com (HELO [10.24.14.123]) ([10.24.14.123]) by orsmga003.jf.intel.com with ESMTP; 30 May 2019 11:16:00 -0700 Subject: Re: [PATCH] x86/resctrl: Don't stop walking closids when a locksetup group is found To: James Morse , linux-kernel@vger.kernel.org, x86@kernel.org Cc: Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Avin References: <20190530155742.84547-1-james.morse@arm.com> From: Reinette Chatre Message-ID: <3859c54e-65fb-5760-5092-509b4a4fb6ff@intel.com> Date: Thu, 30 May 2019 11:16:00 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190530155742.84547-1-james.morse@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi James, On 5/30/2019 8:57 AM, James Morse wrote: > When a new control group is created __init_one_rdt_domain() walks all > the other closids to calculate the sets of used and unused bits. > > If it discovers a pseudo_locksetup group, it breaks out of the loop. > This means any later closid doesn't get its used bits added to used_b. > These bits will then get set in unused_b, and added to the new > control group's configuration, even if they were marked as exclusive > for a later closid. > > When encountering a pseudo_locksetup group, we should continue. This > is because "a resource group enters 'pseudo-locked' mode after the > schemata is written while the resource group is in 'pseudo-locksetup' > mode." When we find a pseudo_locksetup group, its configuration is > expected to be overwritten, we can skip it. > > Fixes: dfe9674b04ff6 ("x86/intel_rdt: Enable entering of pseudo-locksetup mode") > Signed-off-by: James Morse > --- > arch/x86/kernel/cpu/resctrl/rdtgroup.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c > index 333c177a2471..049ccb709957 100644 > --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c > +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c > @@ -2541,8 +2541,15 @@ static int __init_one_rdt_domain(struct rdt_domain *d, struct rdt_resource *r, > for (i = 0; i < closids_supported(); i++, ctrl++) { > if (closid_allocated(i) && i != closid) { > mode = rdtgroup_mode_by_closid(i); > - if (mode == RDT_MODE_PSEUDO_LOCKSETUP) > - break; > + if (mode == RDT_MODE_PSEUDO_LOCKSETUP) { > + /* > + * ctrl values for locksetup aren't relevant > + * until the schemata is written, and the mode > + * becomes RDT_MODE_PSEUDO_LOCKED. > + */ > + continue; > + } > + > /* > * If CDP is active include peer domain's > * usage to ensure there is no overlap > Thank you very much for catching this. The only possible quibbles that will be guided by the maintainer's style preference are the unnecessary braces and extra empty line, but this fix is needed. Also, could "Cc: stable@vger.kernel.org" please be added to the sign-off area? Acked-by: Reinette Chatre Reinette