Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp404376lql; Mon, 11 Mar 2024 06:26:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVbqPmTB+WGYfL02Bo1IR7KRjnY3r+0G8Jz3rBdF86AAVVj2ET8ozfPFODsCTOWibr1yzdIoxzURH34VdYieODJoN57I/uq3kfgUj1Law== X-Google-Smtp-Source: AGHT+IEyHfIu+7+w1OZfXf+Qxt5FPWCk3oPSm157zff4VC5vrCUjWQP3SpPMywoQFUavxEED/yeK X-Received: by 2002:a05:6808:618e:b0:3c1:f1c5:4de3 with SMTP id dn14-20020a056808618e00b003c1f1c54de3mr6065104oib.48.1710163561530; Mon, 11 Mar 2024 06:26:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710163561; cv=pass; d=google.com; s=arc-20160816; b=GL6yprBpzXpQ1R0lwgDTQryfBFEOyKta6pTVgc9mnNpYuh2JpVg7KCtW/jM/6KXmrA f3QTsoYfPO5jmdRNCtOs+WzGmleiU6FCZwFwSfY+LhsVgAojw+kAHRd/vmzxbVYA/xP6 BcQE4UZw+XZg2SRQNa18NZmmNIXXdRoZ5Q3IbeHvD9bi9Peo2CyzSwG1IBQ7zocqU41S wO/Rlc1gSrrWtjzI12AAsNwTLaNYlY8CKtpVY/ao8APQTO0d2jMXc/IwL1BGaWo1f26B vHf12YfhAvuoLLqn8FmEJXjmjkdqAPTxwgjJqXGvBYpxACSu+zE4XeBVuwDyysJaMzz2 SFXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:date:from :dkim-signature; bh=7FJAWUWl286HK3B1oTKlfeERr37p2euSArGWvD1sFJo=; fh=6qrXqYtjRJ8JIxojIlM6oMQQW3MxxBgv2jSscttRxdo=; b=Ngz9XbppHRrvqYS7gzSJC13i3h8nkk/E92c7dRf6Gcbt9Sici8LeJq18TGF6vRBZZl 9HfYXEpT59jSu8oYLGjBwTVqmFunIcy8tFEPvWwNX5m+dt6cdMIVFE1QzejdLh8091ym 7yxOU1/RUxCdi1JwfTOxXkC9xVgWKSjMflzZwGZ2PWZUad9ni2N6NvRL7I4lTvP7Pp8S Cy91kpj8dB0ffx4D027AkbnQtxXc0WpPqZqUSDOL9PwCLGhi9inSGoJyQNt2sMmx+bLI qUASAW2BoDUpgvZGTf17OHXVOw1kJD0xUVtDbu8NSJGweZrk0fQiPXeOOD49yRbFmiqh jzjw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MGexMmWJ; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-98816-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98816-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id bw29-20020a056a02049d00b005d66232593dsi5312648pgb.868.2024.03.11.06.26.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 06:26:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98816-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MGexMmWJ; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-98816-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98816-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E396AB22202 for ; Mon, 11 Mar 2024 12:18:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E02553FB21; Mon, 11 Mar 2024 12:18:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MGexMmWJ" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 D80A33B79F for ; Mon, 11 Mar 2024 12:17:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710159479; cv=none; b=euEeakl0pn6V+IBjVzwQZzbGNxHchd7V9+PiOYMu16EqxmabVEsGNvtvPJu0NhdF+loR7eEwafFhPtIli4Wa+d6hV0qoF+WnL0Z2sBzWuymH1o9KgKXXqh7vc7ZomgGl8go5kDszRVbMLw+5WxmIyqKROTMPQgbjG9mRo9tpd6Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710159479; c=relaxed/simple; bh=lY0f0O/T5DIqAm38n8d6EtkE9SN4TSyT54f5Jpryia0=; h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=mSSLm8fvOWyam8FhFRMzJ5BfgfQSSC6Pi6CmB1m0rDIbiJBzoY8tigouekZGwVFoETX4tXzFCVzlVKWulXXsdKXv+++ZgT8eN37rdFquX2d0563m6gSls6rvc7fcU6OMQEvgPUSBbOw7iQ77wgYRoFfLl8VaYNgrIrPJu0LvZO4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=MGexMmWJ; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710159477; x=1741695477; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=lY0f0O/T5DIqAm38n8d6EtkE9SN4TSyT54f5Jpryia0=; b=MGexMmWJbtlGga++KCKALw6jAQ/PDzK8nEAcsfiZybde8h7TwBJLj2PN 4NzFyYejpcUWe73T4DUOfyUE/CppOWoJby0lRvynKMznyvb2Y9lEEhl2N ZsfWUSz44IzBSFAmFKT8kLV+6g6bW/I1vm+ZS7Fw0NNCdL3HKIWKMq4wl lkikq7ZXBre5OxXrJ8xY0LvpU3R5IUdpN0H5tzBu/oBcghVHYpIIw83lT HDdBvNCFw5tiExrrtbccwUyF4xwdHvy3F+GRodVgJspNWsjbYeY9/Iaug +uNRKyVSqXLKZF4JNT0RW4F5Qzd5Lpt75eDuIUnJjG7jXwrpWxgeu+CyT A==; X-IronPort-AV: E=McAfee;i="6600,9927,11009"; a="27287785" X-IronPort-AV: E=Sophos;i="6.07,116,1708416000"; d="scan'208";a="27287785" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2024 05:17:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,116,1708416000"; d="scan'208";a="42131677" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.245.244.201]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2024 05:17:53 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Mon, 11 Mar 2024 14:17:48 +0200 (EET) To: Maciej Wieczor-Retman , Rex Nie cc: "james.morse@arm.com" , "fenghua.yu@intel.com" , "reinette.chatre@intel.com" , "linux-kernel@vger.kernel.org" , Liming Wu Subject: =?GB2312?Q?Re=3A_=B4=F0=B8=B4=3A_=5BPATCH=5D_fs=2Fresctrl=3A_fix?= =?GB2312?Q?_domid_loss_precision_issue?= In-Reply-To: <3fjeeggediya7cl26snya5o5oif6x2xfd26qmsvroe6jygtufu@whanfahntydy> Message-ID: References: <20240311064822.891-1-rex.nie@jaguarmicro.com> <2u7eg2khp2zrcmbfpnh6ighxqbttv2w7giwdxlkndeywpgq2bq@2lccnqwkbo65> <3fjeeggediya7cl26snya5o5oif6x2xfd26qmsvroe6jygtufu@whanfahntydy> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Mon, 11 Mar 2024, Maciej Wieczor-Retman wrote: > Thanks for the reply, > > On 2024-03-11 at 09:37:37 +0000, Rex Nie wrote: > >Hello, > > Please kindly check my inline reply. Thanks. > >Best regards > >Rex Nie > > > >> >This will cause below issue if cache_id > 0x3fff likes: > >> > >> Is there some reason for cache_id ever being this high? > >> > >> I thought the max for cache_id was the amount of L3 caches on a system. And I > >> only observed it going up to 3 on some server platforms. So not nearly in the > >> range of 0x3fff or 16k. > >> > >It is exactly as you said on X86 platforms, but cache_Id on Arm platform is different. > >According to ACPI for mpam, cache id is used as locator for cache MSC. Reference to RD_PPTT_CACHE_ID definition from edk2-platforms: > >#define RD_PPTT_CACHE_ID(PackageId, ClusterId, CoreId, CacheType) \ > > ( \ > > (((PackageId) & 0xF) << 20) | (((ClusterId) & 0xFF) << 12) | \ > > (((CoreId) & 0xFF) << 4) | ((CacheType) & 0xF) \ > > ) > >So it may be > 0x3fff on Arm platform. Hi Rex, Please also put that kind of knowledge into the commit message upfront. No need to be as verbose as you're here (with code quotes, etc.) but stating that some platforms use higher IDs (e.g., Arm) would be pretty useful in answering the question why you're doing this change (which is one of the key points of describing your change). -- i. > >Reference RD_PPTT_CACHE_ID from edk2-platforms: https://github.com/tianocore/edk2-platforms/blob/master/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h#L202 > > and thanks for clearing it up for me! I browsed some MPAM patches but didn't > notice cache_id was used differently on ARM. > > > > >> >/sys/fs/resctrl/mon_groups/p1/mon_data/mon_L3_1048564 # cat > >> >llc_occupancy > >> > >> How did you get this file to appear? Could you maybe show how your > >> mon_data directory looks like? > >> > >I found this issue on Arm FVP N1 platform and my N2 platform. > > > >Below is the steps on Arm FVP N1: > >mount -t resctrl resctrl / /sys/fs/resctrl > >cd /sys/fs/resctrl/mon_data > > > >/sys/fs/resctrl/mon_data # ls -l > >total 0 > >dr-xr-xr-x 2 0 0 0 Mar 11 09:24 mon_L3_1048564 > > > >cd /sys/fs/resctrl/mon_data # cd mon_L3_1048564 > >/sys/fs/resctrl/mon_data/mon_L3_1048564 # cat llc_occupancy > >cat: read error: No such file or directory > > > >Arm FVP MPAM: https://neoverse-reference-design.docs.arm.com/en/latest/mpam/mpam-resctrl.html#memory-system-resource-partitioning-and-monitoring-mpam > > > >