Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp14133lqp; Fri, 12 Apr 2024 09:13:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXlHSC6lUiJK1QwBKiIqUixLMIZ09+bm7onEHZQkP+hKDP9SDq+Tf7wZZEqoidQdVvsXm7BLzK/ApFytWn5qhKlAkUG9EEpTImF/VJHUg== X-Google-Smtp-Source: AGHT+IE9CcJ3CJEvbtyZ0b25XCmvoar8mxL45ZkZH2eljkr0gG9VklmAfrxE+X3t1H8Cx5ToFaqp X-Received: by 2002:ae9:f447:0:b0:78e:d2ef:3ae0 with SMTP id z7-20020ae9f447000000b0078ed2ef3ae0mr1683028qkl.5.1712938429240; Fri, 12 Apr 2024 09:13:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712938429; cv=pass; d=google.com; s=arc-20160816; b=HzC6DXku2wGZjpl+WHe25Y0DMoGJoft8A7AUmouD/cs+E3v/5EdceHgqYIzmRXQQHG R5m7uS4jorHeJvb8OqwPj8NpItt3wPH7KA4jVXEyQ3RNvzGGR2GTZFt5F07VCRywkyTn O5X3TfrVVC/G8iogevOaA08ISX8+Yss92ttw7y68moABVDThpV6GPBFL2D0zNfVHxpIL 562s9BjJzCMs9YpHxDfTiNlluvGcdwrAc+Bs6OdirwQNQMEib+JHA39Rkk/mfk1JmfEC Xy5weRsaSFaqparui9oU/PLku7hDO9hp4gHrbyY6i14nsBUXq+99G+RjaoA3fcYS/ED0 fIxA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=IOhf5XvplIBNMY3rZzRpnIRHdzTKkxdCXDDbqLyIvuA=; fh=QpfXcl1MWRNwK/PrSFDaf8vyLNOqSjtq+qtJ/l97qlo=; b=JfKUHottcmiuimZiEMCw4bxJdbHeR1xgFV42EVkzkdXGfvyrk8qoOp6Ibu+EFVnzi/ iWYUHZ3Zpln/ONPkdf/jM9mpT9nGgzMo/M8DyBLdudDPE5g5LVSyqsP8XCDNq8xiMUNf 6AE30O6mB+5v1CrAIktSZZiIF+WiP2Vc4uFPES3rLDtRbWDRchB7dQdo31L68s0s4s+n OXpVPtPnLYw6dNKuElsscKS05nL44p6jEuvVNKwEIwxaH/XqrpO8BRqXCwDaAuE/vCg+ UcjBnxFKRrpnBsYHtXIOqGv5MCXg9bgeFYNyNVFFBGpni3iqzY5Fne/W+4eQYDckh2hM Jnzw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-143027-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143027-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a20-20020a05620a067400b0078ebd9c3747si3917281qkh.676.2024.04.12.09.13.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 09:13:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143027-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-143027-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143027-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4EE491C21F1E for ; Fri, 12 Apr 2024 16:13:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 920C614901E; Fri, 12 Apr 2024 16:13:15 +0000 (UTC) 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