From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94D9A3B42D8 for ; Mon, 8 Jun 2026 09:23:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780910598; cv=none; b=trwyxbLx8+MyWpPz7eX3cnykCYaS5PxKC/EWMh8PdBrpDSjP2wAsYqnST3SM4vA5yfGJ8Aq9NoQb8i6yylXBCqofmXgvuACF0dyWzvEqI2Y2TFlkmNQycVMU4Akclrz2/AgPdBavRkJSwSbyMS2a0NFGnfL2LAnKk1NI4czFXKs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780910598; c=relaxed/simple; bh=TZyt5bWoXtCrJ4y73bTn0tSiSAfmUuSAPHte8+/gQGg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=orZbj8JeHp762nxyQ0nNkQ3oDNLbohUHJWOBSRGi+lXjxXLk1iewzelAF/y/O2sWhfBU/fLsRvMbKNwG2YZCOlzw3Xrq4zm/wInKshKlNz0aJ4DZ8yyIXtxigrx+okm6DiVqTBxKqRVnPYiUIOGRHvYSlZzq/sP/UG8CMCvN3jg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=H89T8MuF; arc=none smtp.client-ip=115.124.30.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="H89T8MuF" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1780910594; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=bMqd72Id6tW8+0Fc/bbQY1/PennPNgdj1Xd6ao7nvJM=; b=H89T8MuFpxTIn53IrQV6iGElWQ3SFID1cPHTDaVjjfefhVjZ3rfayhKWvGAm44LsfhcEDQLno5Z/nwCiwvsC9Q09ziACCiJsq9cFfcNQRfaJn4CuZHFw60Ke9QvUaJ8ek64Ux/Zsg7Zz2qr+0/dLJFsqbAWgHusMSq504ltnBO0= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037026112;MF=qinyuntan@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0X4MxVZ-_1780910592; Received: from banye.tbsite.net(mailfrom:qinyuntan@linux.alibaba.com fp:SMTPD_---0X4MxVZ-_1780910592 cluster:ay36) by smtp.aliyun-inc.com; Mon, 08 Jun 2026 17:23:13 +0800 From: Qinyun Tan To: Babu Moger Cc: tony.luck@intel.com, reinette.chatre@intel.com, corbet@lwn.net, Dave.Martin@arm.com, james.morse@arm.com, tglx@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, feng.tang@linux.alibaba.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 00/12] x86/resctrl: Add kernel-mode (e.g., PLZA) support to the resctrl subsystem Date: Mon, 8 Jun 2026 17:23:12 +0800 Message-ID: <20260608092312.3130123-1-qinyuntan@linux.alibaba.com> X-Mailer: git-send-email 2.43.7 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Babu, While reviewing this series I noticed two cross-architecture issues. 1) aarch64 allyesconfig link failure resctrl_arch_configure_kmode() and resctrl_arch_get_kmode_support() are declared in include/linux/resctrl.h: void resctrl_arch_get_kmode_support(struct resctrl_kmode_cfg *kcfg); void resctrl_arch_configure_kmode(const struct cpumask *cpu_mask, u32 closid, u32 rmid, bool enable); but only implemented under arch/x86/. ARM MPAM selects CONFIG_RESCTRL_FS, so fs/resctrl/rdtgroup.c is compiled on aarch64 and the linker fails: ld: fs/resctrl/rdtgroup.o: in function `rdtgroup_config_kmode_clear': rdtgroup.c: undefined reference to `resctrl_arch_configure_kmode' ld: fs/resctrl/rdtgroup.o: in function `resctrl_init': rdtgroup.c: undefined reference to `resctrl_arch_get_kmode_support' Other arch-specific functions already have empty stubs in drivers/resctrl/mpam_resctrl.c, e.g.: int resctrl_arch_io_alloc_enable(struct rdt_resource *r, bool enable) { return -EOPNOTSUPP; } Adding the same for the two kmode functions would fix the build. 2) info/kernel_mode visible on non-PLZA platforms The "kernel_mode" entry is registered with fflags = RFTYPE_TOP_INFO: { .name = "kernel_mode", .mode = 0644, ... .fflags = RFTYPE_TOP_INFO, }, This makes the file appear unconditionally under info/ -- even on platforms without PLZA (ARM MPAM, older AMD/Intel without X86_FEATURE_PLZA). On those platforms the file only shows the default inherit_ctrl_and_mon mode, which is confusing since there are no other modes to switch to. The io_alloc file handles this by starting with fflags = 0 and enabling it conditionally: /* io_alloc: fflags defaults to 0 (hidden) */ static void io_alloc_init(void) { if (r->cache.io_alloc_capable) { resctrl_file_fflags_init("io_alloc", ...); } } The same pattern could work for kernel_mode: set fflags = 0 and call resctrl_file_fflags_init("kernel_mode", RFTYPE_TOP_INFO) in resctrl_kmode_init() only when resctrl_arch_get_kmode_support() registers modes beyond INHERIT_CTRL_AND_MON. Thanks, Qinyun