Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2742724rda; Wed, 25 Oct 2023 10:58:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFg8RZt/EFoZnd2emQ7nntCxd5KwRam0MaOz4X9BjuKPCLkJTSwKzCT/Qj4jiXWuKj7Ev7R X-Received: by 2002:a05:6830:34a4:b0:6bc:f6d0:87d9 with SMTP id c36-20020a05683034a400b006bcf6d087d9mr18568765otu.5.1698256688604; Wed, 25 Oct 2023 10:58:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698256688; cv=none; d=google.com; s=arc-20160816; b=ROMCY9GsIVIRbBjHA4s2NtcpOYR4SD6JL8E297gPD7kx8hDJzu2zbVGpF/UZNY753j bHjXPQfwhLWLbv/dvO9M4c5LMSiOAVv4FMSi+u2/ib5f5LVI7x4W9SCQ/HgdQnaiblo5 UnYq0T9Wp1aTIy37v64eyItISOAHPtTq5CpfVYEsSgzk1/Lkq/GlWxWub4VFzb8FeO3n cm1ytHyo7COV/5SXY7kNeHhwoPj0uxZ8qlX0aiRG9Q0rQlQveXQ3LryEoNSDz1VF8Jv5 YD/HPSU6PvYxWJq7smn9aKtTh+4GcVwMlPgMMS88YjHGlPG++LjprLwzwk0+WotcjZcc zRuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=3OOD5UGcOH1kG2tficryvmQoyzvV6tkWZOBQBoCOR4w=; fh=VuurgKOz/iYGqMeXCSXbmd1sqeKGCB6wb7SlBMhYtIk=; b=P2DBXrjILOhToFY1w/G4proYfQ3X+U0JGHqds4CvDDBGQb6p0p71fzbAEVyidWwA8d mQalEiziPS8XbyxrPVwgNHykdHkx3S11BDYepJ1YZy0BD8ygk+cLiiL+dDQoQvR3mQme IHZHQ6IMMzg9B0z4i5KyRPiIvDGWnqcjbkWUY4Gwk38/SXGZmg1IYktrlEyO1gF/XXXW Ptfd8PqR89G1QD2oFXoHO3nX9oZKQkZ8VexsjXjAyyKAD8K8eqj0YfJ1/pIiXf9cbOOH KSw8s0ZX2OTwBGLYbuHyjmiDqr232UZEk/Fuf8LZ1ktCDyyVZ1DQAZeOqifDFbMaly2x vE1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id n5-20020a817205000000b005a7a8377e1asi11570934ywc.115.2023.10.25.10.58.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 10:58:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2142A81C8706; Wed, 25 Oct 2023 10:58:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234338AbjJYR56 (ORCPT + 99 others); Wed, 25 Oct 2023 13:57:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjJYR55 (ORCPT ); Wed, 25 Oct 2023 13:57:57 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 96F53187 for ; Wed, 25 Oct 2023 10:57:54 -0700 (PDT) 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 7495C150C; Wed, 25 Oct 2023 10:58:35 -0700 (PDT) Received: from [10.1.197.60] (eglon.cambridge.arm.com [10.1.197.60]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EF2E73F738; Wed, 25 Oct 2023 10:57:48 -0700 (PDT) Message-ID: <6c969412-9190-3ec7-4de1-62edded49e83@arm.com> Date: Wed, 25 Oct 2023 18:57:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v6 22/24] x86/resctrl: Add cpu offline callback for resctrl work Content-Language: en-GB To: Reinette Chatre , x86@kernel.org, linux-kernel@vger.kernel.org Cc: 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, xingxin.hx@openanolis.org, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com References: <20230914172138.11977-1-james.morse@arm.com> <20230914172138.11977-23-james.morse@arm.com> From: James Morse In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 25 Oct 2023 10:58:05 -0700 (PDT) Hi Reinette, On 03/10/2023 22:23, Reinette Chatre wrote: > On 9/14/2023 10:21 AM, James Morse wrote: >> The resctrl architecture specific code may need to free a domain when >> a CPU goes offline, it also needs to reset the CPUs PQR_ASSOC register. >> Amongst other things, the resctrl filesystem code needs to clear this >> CPU from the cpu_mask of any control and monitor groups. >> >> Currently this is all done in core.c and called from >> resctrl_offline_cpu(), making the split between architecture and >> filesystem code unclear. >> >> Move the filesystem work to remove the CPU from the control and monitor >> groups into a filesystem helper called resctrl_offline_cpu(), and rename >> the one in core.c resctrl_arch_offline_cpu(). >> >> The rdtgroup_mutex is unlocked and locked again in the call in >> preparation for changing the locking rules for the architecture >> code. > > This last paragraph may cause some confusion since this refactoring > is not changing any current locking. I'll defer to you if you prefer > to keep it. Hmm, that is referring to an earlier version that looked funny and I felt needed explanation. I've remove that paragraph. >> Reviewed-by: Shaopeng Tan >> Tested-by: Shaopeng Tan >> Tested-By: Peter Newman >> Signed-off-by: James Morse >> --- > > Reviewed-by: Reinette Chatre Thanks! James