Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp901605rwn; Thu, 8 Sep 2022 10:16:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR6gTSJQucGpVsuYLutb5e4qd9ERLiqrusIEZ517QF+5OMiu6go6UIP5e5qeWOIPQy0MnMzE X-Received: by 2002:a17:90a:1617:b0:200:9da5:d0ed with SMTP id n23-20020a17090a161700b002009da5d0edmr5132264pja.90.1662657388355; Thu, 08 Sep 2022 10:16:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662657388; cv=none; d=google.com; s=arc-20160816; b=bdADMpBy2nw5IiNrw0cRyY/XAaKwnxs+8DWHSg6p7XdEobAhjZw+yzjo8+EmoOyA/m hcKmyVjwJvoSwE80Pamp/Lzr/tN1XdRgJ0vCqZl4m9ERC4qt+yzCHMewRLGYYmF0bbFW 0ObO4x9hdlAA4bD+1/DIunVhHtWPTP1dH3dSZ8465WXkDtwkO78qhtT9u3BrFAu5d32X nwPYSEAMyDM4wscFvHI+TPx//FMLrYPxiyuUfHvNQ1QrxhspiaElrxO2cGUJXA9/pOIl xEwRXo+XNN/9kGagTtiEHW5fAOqoaDsa5KTXhBKG/wApgs2y2hlO2pf7exioboRsveYx 1wFw== 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=CWRxSkKUTHnZxkudna7UTAzodxzhGybW9DBAYJmaaP4=; b=gOKz35SBy7Bfg7Hy1CSRvWLskM1GbeDrDZk9iNn803iATFNVbq8Wmdxov5pUago1j6 JltARRt5js32V7GlBfDMD5AgbMicHywj59tHTy2F8bOG4a7f+g0FTzZ8xspzi/CUAzFe E3EdkJjRi6+JBIcvZ4yQ6IwEnbMVe25rtxBIb8okBqr7xg4RxjI0bnRwU3r76uwy5TlL MlwXa0dpV90OTZqBIU6S9sfdH/gyjxQNfTB+Wojgv0YXT7KcDlC6j1WutRs8LG3PgZkh TWDzITDyS+cNJ+TX2YlOzPWYuM/GWQ2A1dzAfJLPiO9075yTCC/RylxvenSY60SNnCmZ YwOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x26-20020a056a00189a00b005385d37ab30si22708848pfh.10.2022.09.08.10.16.14; Thu, 08 Sep 2022 10:16:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231205AbiIHRBG (ORCPT + 99 others); Thu, 8 Sep 2022 13:01:06 -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 X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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