From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF49DC25B6B for ; Wed, 25 Oct 2023 17:57:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234507AbjJYR56 (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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