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 DC54FC54EE9 for ; Thu, 8 Sep 2022 17:01:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231251AbiIHRBH (ORCPT ); Thu, 8 Sep 2022 13:01:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230476AbiIHRBD (ORCPT ); Thu, 8 Sep 2022 13:01:03 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 11F48D2748 for ; Thu, 8 Sep 2022 10:01:01 -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 DA3EC153B; Thu, 8 Sep 2022 10:01:06 -0700 (PDT) Received: from [10.1.197.78] (eglon.cambridge.arm.com [10.1.197.78]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BA5493F71A; Thu, 8 Sep 2022 10:00:57 -0700 (PDT) Message-ID: <2284408e-deb1-589b-bcdf-88e056980f79@arm.com> Date: Thu, 8 Sep 2022 18:00:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v6 05/21] x86/resctrl: Add domain offline callback for resctrl work Content-Language: en-GB To: haoxin , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Fenghua Yu , Reinette Chatre , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, Jamie Iles , Cristian Marussi , xingxin.hx@openanolis.org, baolin.wang@linux.alibaba.com References: <20220902154829.30399-1-james.morse@arm.com> <20220902154829.30399-6-james.morse@arm.com> From: James Morse In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hao Xin, On 07/09/2022 07:29, haoxin wrote: > 在 2022/9/2 下午11:48, James Morse 写道: >> Because domains are exposed to user-space via resctrl, the filesystem >> must update its state when CPU hotplug callbacks are triggered. >> >> Some of this work is common to any architecture that would support >> resctrl, but the work is tied up with the architecture code to >> free the memory. >> >> Move the monitor subdir removal and the cancelling of the mbm/limbo >> works into a new resctrl_offline_domain() call. These bits are not >> specific to the architecture. Grouping them in one function allows >> that code to be moved to /fs/ and re-used by another architecture. >> diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c >> b/arch/x86/kernel/cpu/resctrl/rdtgroup.c >> index 030a70326ccc..5830905a92d2 100644 >> --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c >> +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c >> @@ -3233,6 +3231,45 @@ static int __init rdtgroup_setup_root(void) >>       return ret; >>   } >>   +static void domain_destroy_mon_state(struct rdt_domain *d) > add inline ? As previously, the compiler doesn't need to be told it can inline static functions in a C file. Thanks, James