Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp782706rwr; Thu, 27 Apr 2023 08:06:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ52Rfzc4U1JxN/x0qkRsGioNrOKgnRMeQ8a3FFFRp4rCmA2dQU1rRx33zm7VgRkKhLDokUv X-Received: by 2002:a17:903:22cf:b0:1a9:4167:5db7 with SMTP id y15-20020a17090322cf00b001a941675db7mr2250000plg.4.1682608001037; Thu, 27 Apr 2023 08:06:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682608001; cv=none; d=google.com; s=arc-20160816; b=u+Qb4OuLPjtsw00BuFDzErlObLNcjSjiY5qV3Wyg02SA71tOyblvRmHU7epjEeqFRA msYh9m6h5Yw9IWa0ttU0dYbkQiIgMZXymDgfZAZlQ9wbUfHzqGA6sYq3Qec2xWSvjUgU 5VtnEpvJiAZBJ+BNW+7K1RrXDd8p9DDSQVO/bvPRIbcuJj8JCHwIg6+XlaXpYqBt8mw/ nD8/0/FJzDQOXP0gFX7yjz3s66tmpSf9ndKacw3pwEwibOF2DqZOk9hsYMQCBH1LW9u8 5TX+eidOUlaayFp4iUE0JxesEmaMiGgajWUIpbc6Q70C9HG4ha3Fp/iyAQzTidXwQlcM mZkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=30rS18U2G7Pyu8Ijtyl3laJS0YAXgZcKql310qM8sgg=; b=XrJgaHhpT6LH1/anF2nFSVXGcIsJPZagHCdnJwuj++I2PuQhYfqZeIdMZqYaavq/b7 69ubJgP5Fzgq99P9lJ63Ch6AG84CuNTY7dwJUhf9nnQUxslmDujXfOiuUQ7rwdON95la BkhjRcqLIOJzM0qpPmDthIKfPPW97uHQnoKnAL9A/SlM2FfH3vQgXMNA4gD2WUQTvdQb fmtRIShis0A4V0h+WtNPWe5ZCuY4DBKHX6J7KKD+WdgToShLy2W48SYL8b5C4D+C+4pI mOLeonxvccOaI0rIYLdLcrNT77+ptoI2TwgDeCSZd2BGto/KJgvh7SIADbkE6cxJ/jPl +1bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GSMd9aUt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p2-20020a1709026b8200b001a65688c863si18602044plk.56.2023.04.27.08.06.25; Thu, 27 Apr 2023 08:06:41 -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; dkim=pass header.i=@intel.com header.s=Intel header.b=GSMd9aUt; 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=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243715AbjD0Ov6 (ORCPT + 99 others); Thu, 27 Apr 2023 10:51:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjD0Ov4 (ORCPT ); Thu, 27 Apr 2023 10:51:56 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56454C5 for ; Thu, 27 Apr 2023 07:51:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682607115; x=1714143115; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=h2wDgROToYLVjyarVVgYuJhEUBJ2W62ONlj3SIeylx4=; b=GSMd9aUt/EjOTl20v52rIPeOq/BTrKIHXfMIkm4udPl4HaUYOk04AQbr xP4ghSlZE+yGVfwlDGYNn3bW/58AjLRdYqqvlNLyF/MmjIZbzDLxFWrt9 Viq8jq34wihyvlYpCejEebEBZ2nJvz3NQfM4yRtPR/jMz55D4+zIpmP8R cqGLfhytt3BrLda8yqlt+YS9yjKkQyYauUubWaiSH15epqhJbp8gsi4lM yqjpCy3FOQ3qVyHNFz624j+UhZd9sdKEZTAcm7I4fZJMRgAb7+hgrGTy3 i8aMUBNdfqzFWAMA0luAvXV+6fWuFZKvkNzXodnRUY2N6a+1Y773Alehu w==; X-IronPort-AV: E=McAfee;i="6600,9927,10693"; a="327787144" X-IronPort-AV: E=Sophos;i="5.99,230,1677571200"; d="scan'208";a="327787144" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2023 07:51:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10693"; a="671812009" X-IronPort-AV: E=Sophos;i="5.99,230,1677571200"; d="scan'208";a="671812009" Received: from mmaiores-mobl.ger.corp.intel.com ([10.251.215.69]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2023 07:51:48 -0700 Date: Thu, 27 Apr 2023 17:51:46 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: James Morse cc: x86@kernel.org, LKML , Fenghua Yu , Reinette Chatre , 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 Subject: Re: [PATCH v3 18/19] x86/resctrl: Add cpu offline callback for resctrl work In-Reply-To: Message-ID: <3a8a355-5d51-3c4-dd3b-21f1fb112ce6@linux.intel.com> References: <20230320172620.18254-1-james.morse@arm.com> <20230320172620.18254-19-james.morse@arm.com> <988232ec-988f-5d12-eacb-8095d8c01eb6@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1861291232-1682607114=:1971" X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1861291232-1682607114=:1971 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Thu, 27 Apr 2023, James Morse wrote: > Hi Ilpo, > > On 21/03/2023 15:32, Ilpo Järvinen wrote: > > On Mon, 20 Mar 2023, 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. > >> The resctrl filesystem code needs to move the overflow and limbo work > >> to run on a different CPU, and clear this CPU from the cpu_mask of > >> 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 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. > >> > >> resctrl_offline_cpu() is called before any of the resource/domains > >> are updated, and makes use of the exclude_cpu feature that was > >> previously added. > > >> diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c > >> index aafe4b74587c..4e5fc89dab6d 100644 > >> --- a/arch/x86/kernel/cpu/resctrl/core.c > >> +++ b/arch/x86/kernel/cpu/resctrl/core.c > >> @@ -578,22 +578,6 @@ static void domain_remove_cpu(int cpu, struct rdt_resource *r) > >> > >> return; > >> } > >> - > >> - if (r == &rdt_resources_all[RDT_RESOURCE_L3].r_resctrl) { > >> - if (is_mbm_enabled() && cpu == d->mbm_work_cpu) { > >> - cancel_delayed_work(&d->mbm_over); > >> - /* > >> - * exclude_cpu=-1 as this CPU has already been removed > >> - * by cpumask_clear_cpu()d > >> - */ > > > > This was added in 17/19 and now removed (not moved) in 18/19. Please avoid > > such back-and-forth churn. > > This is the cost of making small incremental changes that should be easier to review. > The intermediate step was a little odd, so came with a comment. (I normally mark those as > 'temporary', but didn't bother this time as they are adjacent patches) Why not mention the oddity at the end of changelog then? That keeps the diffs clean of temporary comments. > If you'd prefer, I can merge these patches together... but from > Reinette's feedback its likely I'll split them up even more. I don't prefer merging. -- i. --8323329-1861291232-1682607114=:1971--