Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp272246lqb; Tue, 28 May 2024 15:21:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVZPJMT9GPTFB5ABkBZYl7ZTcnqGOEwiLTuoOyZnByzt73OtsoAKwD9B6FTMHZBSU1AepN2ul/nLw/v/En1KCNQ8wpraPRtOosFwdQXlw== X-Google-Smtp-Source: AGHT+IGFEybBBW+okciJcUQQsFM1/D72zTjxdqo+YDlgiNg/0dZg9KB5AzWp2dq9w/Y8V8kv84yS X-Received: by 2002:a50:9fc8:0:b0:572:2fdf:b965 with SMTP id 4fb4d7f45d1cf-57a03f2cfd6mr342681a12.7.1716934884912; Tue, 28 May 2024 15:21:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716934884; cv=pass; d=google.com; s=arc-20160816; b=RZgYWtIpByRwf6b/Y4wo3fJR/Lk2qRPe2JPMsZJHi6R/yF5b2/haD9isR10Hvz4Cf0 mE8CIyJrFFxV6HAdKS8BUzgN5YRGST9opHtAlc4YrjeDYSJiTA7RWEQMrWZAQWfHP+cc hqxEN5Ruk07/VnUfMZtuqkQG0lGlQSEkXZNSfips1NX+u0U9b9YtFG8ZB4zR3xZykPq/ dBx/boTIFb84QCdNf5UrhchJUJcuoUtdvpQWOG8iD1dpfNyaOqkSY8suqFgwaQI2RYXw 7n43vlxagW7r9Urrsm6e6PEuEpoTnLfppqopSMZVur9xlOsvL4SjmMBFF2UgkLfnxKiP vCEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=fte7j3sCOCCD0djZ7/VVRV33WoVqj30agUckQnelEnE=; fh=qTx768JYq6oxdX3jfjUzjJGF83d0IKGtQzHdow3lchk=; b=lYRY26V3RqDppUGpQzbA4rg7LTykTSnFLxwTkqC6v0fPeWIkCqALCcENtbWZ7ROZlg bVMVF8et7B5EVbxFCbmGSlv+XgnvVbpBKCmD7okZ7wQR4ObHAJmy7DBxu67I7GmVU5bS I4C44doz+W1FEX1gNpOefd9gOE+adbi6KnRQsVEkJVd9qxy1wSIcwNJnhtaUSqgzRBuV nU/bxBygNUpDi/gfuJVCBibNNLjYq41521nRhwIhnPRt8b+HgVdZT4M5Jab69rY41D1D 31dliPNjFQWw6X9RoftkS6Gwj72q7Jqa2MdEK4qUz09cbGTFffIBACUb+RC7Kr09Twz1 wn3Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KdPZXTOw; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-193163-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193163-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5786400f635si4768331a12.649.2024.05.28.15.21.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 15:21:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193163-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KdPZXTOw; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-193163-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193163-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 am.mirrors.kernel.org (Postfix) with ESMTPS id A4AF51F24F5B for ; Tue, 28 May 2024 22:21:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4219A13E3E8; Tue, 28 May 2024 22:20:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KdPZXTOw" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 6875413F01A for ; Tue, 28 May 2024 22:20:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716934824; cv=none; b=UnO0kxhVSLuSCG6k1yjoPBG0RWHuvBbt4DJQaq+3Q39DEd/okfQsJeHDnSoPUXpLMTOj3INh0PMr5wnn2x2Cvl2S1IWq2jEDiCEebzOFl7TKz1KsaDwq7HYAZktdZocTgQdpE0KHE+UnNnLXg1kWKoGmbu4gLJSiCPMeovymUJ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716934824; c=relaxed/simple; bh=pOQZF8HFVACiDlR+DiYZ0BzMt0qWyIWt5Aigq+NSKkw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lshlJP1aang4862FbvvSF1gUznO5q9b9Rgm99cXplunjYAYONdOtCBdRKXbtj9gxgBeMSsAOGoSeREZUh2wR9eUMD6ZNjdtPwRuvAQDl7nMI18EO4HnhcWAiRw55BifLsfW6hPd04iCh2uSv/5VgOT7YE26UnYEeAWvrVRuDBS0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=KdPZXTOw; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716934823; x=1748470823; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pOQZF8HFVACiDlR+DiYZ0BzMt0qWyIWt5Aigq+NSKkw=; b=KdPZXTOw4dCR+HkfHarEGQOvuHlr5BaxECeA3GE1vpOYet6nKlOYwtZJ /pg6K4OmEmMwMOQ3aTF5qvYxXe1HQgWDDZxpOm7qvsNaKEdzl+22BeeAR UMgmwGif84fdx3zYllRSYqskaH45y9k5qJQo8e5h74+mG6qy0j7HuZ8TT kEhMxqgQerjAynOQi6sNA9s55mOHScNT2lF0tEmjuWBnnzWGUrfSCmvpX HBLzGYqSEpRWaLQ1kiL7rsP76+p+3//yxB+u6r7pGVdxSfuV2OqDD97+o SPdcWGGObwHSu+XknJSp1Seady8eKBspS7a3B8kN5kfSrK5A1khGQHNnW Q==; X-CSE-ConnectionGUID: jG+mGo68REima1YFYKppBA== X-CSE-MsgGUID: LYeN2TKcSl+m8bsEHi43qA== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="30812197" X-IronPort-AV: E=Sophos;i="6.08,196,1712646000"; d="scan'208";a="30812197" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2024 15:20:17 -0700 X-CSE-ConnectionGUID: FZvuxAP9StWnXt+DJU6LHg== X-CSE-MsgGUID: Fg6efc1BTnyPVBiKm1F4Uw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,196,1712646000"; d="scan'208";a="40090737" Received: from agluck-desk3.sc.intel.com ([172.25.222.70]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2024 15:20:17 -0700 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Maciej Wieczor-Retman , Peter Newman , James Morse , Babu Moger , Drew Fustini , Dave Martin Cc: x86@kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v19 09/20] x86/resctrl: Add new fields to struct rmid_read for summation of domains Date: Tue, 28 May 2024 15:19:54 -0700 Message-ID: <20240528222006.58283-10-tony.luck@intel.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240528222006.58283-1-tony.luck@intel.com> References: <20240528222006.58283-1-tony.luck@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit rdtgroup_mondata_show() calls mon_event_read() which calls mon_event_count() which packages up all the required details into an rmid_read structure passed across the smp_call*() infrastructure. Legacy files reporting for a single domain pass that domain in the rmid_read structure. Files that need to sum multiple domains have meta data that provides the L3 cache ID for domains that must be summed. Add the sumdomains and cacheinfo fields to the rmid_read structure. Add kerneldoc comments for the rmid_read structure. Signed-off-by: Tony Luck --- arch/x86/kernel/cpu/resctrl/internal.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h index eb70d3136ced..d8156d22cbdc 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -145,12 +145,28 @@ union mon_data_bits { } u; }; +/** + * struct rmid_read - Data passed across smp_call*() to read event count + * @rgrp: Resctrl group (provides RMID value) + * @r: Resource + * @d: Domain + * @evtid: Which monitor event to read + * @first: When true this just requests initialization of an MBM counter + * @sumdomains: When false just return monitor count from domain @d. When true, + * sum all domains in @r sharing L3 @ci.id + * @ci: See @sumdomains + * @err: Used to return error indication + * @val: Used to return value of event counter + * @arch_mon_ctx: hardware monitor allocated for this read request (MPAM only) + */ struct rmid_read { struct rdtgroup *rgrp; struct rdt_resource *r; struct rdt_mon_domain *d; enum resctrl_event_id evtid; bool first; + bool sumdomains; + struct cacheinfo *ci; int err; u64 val; void *arch_mon_ctx; -- 2.45.0