Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp79831lqb; Tue, 16 Apr 2024 09:16:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9irbe35c0k/PXnW38N85wrsc4AQeAbtjrS3bGjU9ap8VvLavLMOOi8YyWKQghX0A+Ikr1vT+/J7TCCw9+B31cumh+HG2w/9gqPQYy3A== X-Google-Smtp-Source: AGHT+IF6MQlgLode8SKTzdMchbtSOQssw7+5TbR1+OYqkGxpfzOnV2feov4xAipSmGKLrk0y+OLj X-Received: by 2002:a17:907:20b2:b0:a55:201f:4b62 with SMTP id pw18-20020a17090720b200b00a55201f4b62mr3201277ejb.0.1713284218439; Tue, 16 Apr 2024 09:16:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713284218; cv=pass; d=google.com; s=arc-20160816; b=iJUfdrnZHDpFpHqvUFVkvOkFMuOW71WRAwCsKmSbjw7Ib3D8+m+nWOxjymQIVh3V9a fy64wi+FZs7V+ATEWtVpqPaJQN2sp5uSZiPaaz9MjN99TsYZMqQYILRcsmEu0zDvtql1 eUICCmsaSa6YbYk/qBgAIRQUXI+Llaujnpy3exkiKfpIMtVe7btiaF5+1iGEJS3t8xjE AOIofzftsm/G/WRlDjYxkMuZxgBysc8X310zIRaC0HQEL8ttryyxKaRHRSbXAodGDutr I5ODFczSzU1JIePdIHH4uTwp2BHayPJ5/qZfQbkqKufHkKLDDv8s9dM2ZsO8+u9f85qL B+Jw== 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=0ewxswwxWOEY6VujdVq5mb449xZ1TCghtxYgJzVwe6k=; fh=QpfXcl1MWRNwK/PrSFDaf8vyLNOqSjtq+qtJ/l97qlo=; b=nJa4Hc2dU8kVJW+fTneD0JVpBbfdrGsNA/kZ0BOj+lQhxFJuth8criWhrxMJ14e2MQ GUiJBSQ3Ge5LQxIT9LeyHNwiksdprWFXEAZS9Nm68I3Ld/C90RfLTqpElqtz4vhCb/o1 iJkT/10JM6RFQ5xzy7W4G2rNCiufABq/007vREFOXq0r/SReTwO1ePmedPqWrzX0AW4t AcRGbgbSrxM9aGSGSGK8qn9o15JCz5CUyW5Xo3kP+8R9MZsOf3Q521AUCOt1NjJ1UbkV oXRXv+CqonouZbfMPO3/v5NYssRlJ96LucTJ2HCV5tH6DyXt4t+6tkmlGpeaJpK1wohC YqYw==; 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-147214-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147214-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l17-20020a170906795100b00a525e526f17si2962190ejo.159.2024.04.16.09.16.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 09:16:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147214-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-147214-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147214-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 470501F2202F for ; Tue, 16 Apr 2024 16:16:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF30A13174B; Tue, 16 Apr 2024 16:16:32 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB77412EBCB for ; Tue, 16 Apr 2024 16:16:29 +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=1713284192; cv=none; b=SzqD4vrV1/q5fLBU+Fok1r0gPbmaZ9t9iQbkrUVXsuB2VzDn61eipHhUzmN72mnuSfAbTK2ncGj2fgSje0i5bx20PZR8MBVYLBNrSIwxDh+6WqOLhcWZjRbKdoosZo/r2JDpd0Bs64ReIr8alKJvhb791J6xIucxIJzsJrJIDgw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713284192; c=relaxed/simple; bh=S5K7SFmE4dfMjysbYJ5MwR3t5QxHLkujkgTHIM9Uyms=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=W+oY9OMYWJ7nKLjImHhlIyV+zoqqBZisew0LQ9DMpuFiunus/xz9zEntT30e7KRvSU/o1hOKCrXBMUGmvXjWI5Psj7lJsAZfWnQQPAz3rOk7irG59YgRbjKtVGPHqMJq8qAMglsHlVSRIpWn9CjN464Az+YvHhxjYJk1gZdcLz4= 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 3F47A339; Tue, 16 Apr 2024 09:16:57 -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 4B1783F792; Tue, 16 Apr 2024 09:16:26 -0700 (PDT) Date: Tue, 16 Apr 2024 17:16:23 +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> <6469d1c9-f535-45e8-91b7-992175cf4697@intel.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: <6469d1c9-f535-45e8-91b7-992175cf4697@intel.com> On Mon, Apr 15, 2024 at 10:45:07AM -0700, Reinette Chatre wrote: > Hi Dave, > > On 4/12/2024 9:13 AM, Dave Martin wrote: > > 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 */ > > Looks good. If the comment stays, please do replace the tail comment with a > freestanding comment (for reference you can search for "No tail comments" > in Documentation/process/maintainer-tip.rst). Ack, noted. Cheers ---Dave