From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C5E9614882F for ; Fri, 12 Apr 2024 16:13:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712938395; cv=none; b=tMQfX3mjlJgux8KXkt2kbzhulOK9p3kkjA9SmsshKdW3vszh9inWiDbmRMD7AZSBQIAz/jdmZjjhN3Oi92vZh6UTFRpETWW/cmoVKoFuGjaPqSGRdbu+KJ2ag0Z0Iz9V9xvDWL+BK15r5jyj+TNsNh3/34X5UsZVoxI9fRfIbzk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712938395; c=relaxed/simple; bh=TogCotCELavXeUBjFHCUXj0I5x8W6pZ77kHnMCXXaEw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mXtVwqNbUAI3Jq8DUKc2IpjAFNruNeBB0DTrQ8nQaj7TCip/pF2W1sWFr0XMGSS35JvUjcKq35JSl+g6dOzNZpsK2GHXRU/GIiI/GRV/zkQV9qrQfUwJrfNqJpSrnsg9OYiPfm1GWhPCGLrSwEzwk9BPPdsF8sU9xe0l9xcqQG8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2D9DA339; Fri, 12 Apr 2024 09:13:42 -0700 (PDT) Received: from e133380.arm.com (e133380.arm.com [10.1.197.52]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 350B93F64C; Fri, 12 Apr 2024 09:13:10 -0700 (PDT) Date: Fri, 12 Apr 2024 17:13:07 +0100 From: Dave Martin To: Reinette Chatre Cc: James Morse , x86@kernel.org, linux-kernel@vger.kernel.org, Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , carl@os.amperecomputing.com, lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com, David Hildenbrand , Rex Nie Subject: Re: [PATCH v1 04/31] x86/resctrl: Add helper for setting CPU default properties Message-ID: References: <20240321165106.31602-1-james.morse@arm.com> <20240321165106.31602-5-james.morse@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Apr 08, 2024 at 08:15:03PM -0700, Reinette Chatre wrote: > Hi James, > > On 3/21/2024 9:50 AM, James Morse wrote: > > > --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c > > +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c > > @@ -3623,14 +3623,18 @@ static int rdtgroup_mkdir(struct kernfs_node *parent_kn, const char *name, > > static int rdtgroup_rmdir_mon(struct rdtgroup *rdtgrp, cpumask_var_t tmpmask) > > { > > struct rdtgroup *prdtgrp = rdtgrp->mon.parent; > > + u32 closid, rmid; > > int cpu; > > > > /* Give any tasks back to the parent group */ > > rdt_move_group_tasks(rdtgrp, prdtgrp, tmpmask); > > > > /* Update per cpu rmid of the moved CPUs first */ > > + closid = rdtgrp->closid; > > + rmid = prdtgrp->mon.rmid; > > for_each_cpu(cpu, &rdtgrp->cpu_mask) > > - per_cpu(pqr_state.default_rmid, cpu) = prdtgrp->mon.rmid; > > + resctrl_arch_set_cpu_default_closid_rmid(cpu, closid, rmid); > > + > > While I understand that the CLOSIDs are the same, I do think it looks unexpected > for the CLOSID to be set to the CLOSID of the group being removed. Could this > be set to CLOSID of parent group instead? > > Reinette That seems reasonable. How about something like this? - closid = rdtgrp->closid; + closid = prdtgrp->closid; /* no change, but the arch code needs it */ Cheers ---Dave