Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7904019rdb; Thu, 4 Jan 2024 11:14:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKmJOOP1ixRT2bPoNgmq2E9DtjV90Dta/Jo6drM2b5VegI3ndYJriBFscKNlOEpZZ3ftv2 X-Received: by 2002:a05:622a:130a:b0:427:e834:b979 with SMTP id v10-20020a05622a130a00b00427e834b979mr1090378qtk.99.1704395642983; Thu, 04 Jan 2024 11:14:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704395642; cv=none; d=google.com; s=arc-20160816; b=p0TzL5MHYzA/8eU4zZOW/UegjDqx5iUHD+ij/QpOBzUILmbU2eiytOELv8esj8BHTM m6qmr2NNi6fTexfmuTrqAPSzVI2fCSKHvclwaHT+ZLLU3CqtOnkZE9k58HNj9mbdlDo3 PUw2KGTxl8dZUtUh8PerZ+mfamLJeiNbmUl2ZsBYguZbaUV2+lBGSNTWJaLIz3vdcq1J eabpvNXyEjSzlfBcs8fjAq1hHB2q+GJ76Xx6c8VA+mm9D+UM46yfKslDIGPq5mrZndTY ENBFcGj7nDY/kbhGrdI8AAU5N1EPKTkC55U4b+3IrF9rVdbvS0eckViMfrTUsAjfgxXt lIvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=sHGAPn/+NHpE1B6gjxmM7YpR92I2FPZpzdnyVIrUAnU=; fh=hyt+34jcjndTayE4zma/2hHmM0cvbzvNl+rHFjvUBNA=; b=08D4YblEG6F7H3G1YOL43ApDK4tv4U9SR9+qm2KV8fk7Bw3LfSFGXnWLm0uc2QHfhY q+YRM6Wm8gUF9FSPO6uF+J2D0o5zmoHbjhcSXqiKINum+5rtHEV6kC+TXBvrJWrkO53D 3T/tPaIAjf9VG8qfVM1FPTcD1t3/rPk/+1ZODriNiUGTZwEiXqomh0+v6n3q5ejMfxWb w0xTXdZ8B/Q3p7VFDdG5NutByHxJXBuw7I2E6TnbP+o7YZ9aOGNcczjtx5bkAoPx1rW5 Id8hAycgFrsM4gbnXEznj++1d3q4TNbogE+TmlX5u+D5/+g2114gTgiCvqgAMqhzLVwK 8ekw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="GlyzLG4/"; spf=pass (google.com: domain of linux-kernel+bounces-17137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17137-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y12-20020a05622a120c00b004254a646fe5si118879qtx.760.2024.01.04.11.14.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 11:14:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="GlyzLG4/"; spf=pass (google.com: domain of linux-kernel+bounces-17137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17137-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 972A71C225DD for ; Thu, 4 Jan 2024 19:14:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DA732C194; Thu, 4 Jan 2024 19:13:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="GlyzLG4/" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0210828E3B for ; Thu, 4 Jan 2024 19:13:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-il1-f176.google.com with SMTP id e9e14a558f8ab-3600b2c43a8so15345ab.0 for ; Thu, 04 Jan 2024 11:13:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1704395627; x=1705000427; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=sHGAPn/+NHpE1B6gjxmM7YpR92I2FPZpzdnyVIrUAnU=; b=GlyzLG4/ptBrGTuyqL29cTJjIwhpuzWd+b6omFGUImKd1SmkfhGA7P+k9xKORAfDoD KyHlNV98vn529UfkTHkREb883saRQN5mhLwL3SCum52tv3FLS8NMuZMnDjnCnh/IZIN1 INAMZFsOItb+DPJKcdxFLs8XBEqE1Ifxglk6n3aHia9GJTnxiKxG1s78zrtaQ4FrAcHY xJEUxv0XjA71s/9GJOZwDk7U/AeFv7BQM47bU86ru6HZt5INczLDsbyEbDWV6EEZHlIY GKyxTHY2HKzbsgn8N2c2T1Anb2J7znJ8+caoU+WhsYCp9yNPNXhUjIEXAXFLCzsPkEEX K5XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704395627; x=1705000427; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sHGAPn/+NHpE1B6gjxmM7YpR92I2FPZpzdnyVIrUAnU=; b=X4PQzI+itSy7Nm/aehnKfd1Jedsrupljm9GFsdlin/YFy8qHwszXdTGOhtRyUAPmoL ktYz8BKbjsXzlOsxonUN/ACNmeu07rXqRnrVMJ5U58ZDQrmI0ybU9oe8ZFMU2c5Tj+yR JLfINzybj8P77rBrrpD92fVxIbCW21V6LeU93DBcdtKdk3IrNYCuVDLySx6ef9uQiGPb 1MAUbFMtoTWedQ8ZQeQKcH4wSTJkSo7iNmHK2IeGv/LLDkvnvtsAa+sKIUkrTz9Gj2uz sqpBbNO/X5+QeCk27snK4nCiEnUcTKmVqb9IjZwmNUCiGBMaNOmqaKyuFaQOdp0cl7wk TKeA== X-Gm-Message-State: AOJu0YyoXC25loKAe/Ieio6DD/xcpwEuiCLChEkj1aUyhdHCfrTFW+qQ fjQgc8UMFr9zV5mGECkPKomzhTxCyTDdYcexwIzWjuvA2mwq X-Received: by 2002:a05:6e02:1a08:b0:360:2776:e4cc with SMTP id s8-20020a056e021a0800b003602776e4ccmr35716ild.2.1704395626984; Thu, 04 Jan 2024 11:13:46 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231215174343.13872-1-james.morse@arm.com> <20231215174343.13872-9-james.morse@arm.com> In-Reply-To: <20231215174343.13872-9-james.morse@arm.com> From: Peter Newman Date: Thu, 4 Jan 2024 11:13:35 -0800 Message-ID: Subject: Re: [PATCH v8 08/24] x86/resctrl: Track the number of dirty RMID a CLOSID has To: James Morse Cc: x86@kernel.org, linux-kernel@vger.kernel.org, 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, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , dfustini@baylibre.com, amitsinght@marvell.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi James, On Fri, Dec 15, 2023 at 9:44=E2=80=AFAM James Morse w= rote: > void free_rmid(u32 closid, u32 rmid) > @@ -792,13 +813,33 @@ void mbm_setup_overflow_handler(struct rdt_domain *= dom, unsigned long delay_ms) > static int dom_data_init(struct rdt_resource *r) > { > u32 idx_limit =3D resctrl_arch_system_num_rmid_idx(); > + u32 num_closid =3D resctrl_arch_get_num_closid(r); Which resource is this again? Surely the one with the smallest number of CLOSIDs? It's not much harm if the array is bigger than it needs to be, but I've become curious about how The Monitoring Resource is used in the code when there are later changes[1] which would cause this function to be called on RDT_RESOURCE_L3, RDT_RESOURCE_MBA, or both. Given that we have hardware with event counters residing at different levels of the topology and possibly being associated with different rdt_resources, more attention needs to be paid to how these parameters are used in code related to monitoring. -Peter [1] https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/commit/= drivers/platform/mpam/mpam_resctrl.c?h=3Dmpam/snapshot/v6.7-rc2&id=3Da0ab3a= 6c26002