Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp723176lqt; Tue, 19 Mar 2024 01:31:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUwUZe1M45/llFzk3Cofk3LKOjUcFhdVRAHthB6ONw99kF6FSC+N04cKWxAU5017OTvKBKZHh0vRh+FFvZWG0OAuvZ21Lh947wkmMnLfA== X-Google-Smtp-Source: AGHT+IErzpUGkfzYhJA0K1UFuzPmLsOMDJG59NY7baIOJEBtax9CwteG4ayQghheSeuWTN4JsN9K X-Received: by 2002:a05:620a:15b0:b0:789:cfa7:74b with SMTP id f16-20020a05620a15b000b00789cfa7074bmr1792790qkk.17.1710837100365; Tue, 19 Mar 2024 01:31:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710837100; cv=pass; d=google.com; s=arc-20160816; b=Vft0g9YVvgzq8gwh70y9LZsBDiJBJiCvGVM3Tg3yJ2fVfStgFZm9ljKIVyssExAGmf w4JL2WssnkNem34T2OC91RRFImKBJ9r43mS56OHBDAkqqT5Qnb8e7k5ztgapG8+73m+S R0cDHjIsCw2kCmoTKdoVU0rBMd5u7n9T4GsJ28qBmVa+YEQaaB9PPI7PQxjCmz4dMT6V NcotrXAH6J/2ExpS9sICii2K5tRgaC6RPSmkC2pboIjQOKyNZRINXIZ14jVb67SHq7HY dqTM6LJpfa5USc5QUYpYzY1V8ToM4Jt18IsFweQ1WVYrcnmPNlF2D0IM5yAbTdpP71dP lwFA== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=iC286gqeu87dpLs4MzEjxy2NyBEm8le59VZf4WE61d0=; fh=Q4fY8kaMH7V8N2k4o+DAmKGDvGTWx9AcUiddmmmseBU=; b=ZYe4bWppKnCOY0ksekLqBd6mT8Aiy394hjx509Py1Rt0Zpqc4u0/ceuGr3mRy2Drhq hjWOvoZ5LI9+q9IN9ztOtk9DyFllFBCBFzR7HUekLDX06KSIW2hbEGnmAI34TLzu01WS Zw51zpIMqEomxIl3xKp44qZRAPHkm9PXWidkZdoJZjkArgGgiUt+t6A4dCffEafd0WpE sGoUcrBb7kEa24HdW+XciWJ5ltonmEBUavDxuUeTjCOiN8K2yXtHogbU6B7gemvORXEA /Xr/mauCAFe3TTqNL2oq7LyrSwnKaMHGH4vxwNbKXoFNPeR6ajzB1cVENmU4b6A5HdQx fcZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@shopee.com header.s=shopee.com header.b=HZ3aT2qx; arc=pass (i=1 spf=pass spfdomain=shopee.com dkim=pass dkdomain=shopee.com dmarc=pass fromdomain=shopee.com); spf=pass (google.com: domain of linux-kernel+bounces-107246-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107246-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=shopee.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 x21-20020a05620a099500b00789e614ce90si8445747qkx.767.2024.03.19.01.31.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 01:31:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107246-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=@shopee.com header.s=shopee.com header.b=HZ3aT2qx; arc=pass (i=1 spf=pass spfdomain=shopee.com dkim=pass dkdomain=shopee.com dmarc=pass fromdomain=shopee.com); spf=pass (google.com: domain of linux-kernel+bounces-107246-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107246-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=shopee.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 1D0711C21B97 for ; Tue, 19 Mar 2024 08:31:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5259754BDE; Tue, 19 Mar 2024 08:31:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=shopee.com header.i=@shopee.com header.b="HZ3aT2qx" Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) (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 78762548F8 for ; Tue, 19 Mar 2024 08:31:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710837067; cv=none; b=hjC/jyHpfrjO9gE822bp0lapk5ztF/78deaKrmrx8499kvMmm+eKYtP2UezGS1yaUrZD69PjgRTKHI8RYFGP8FF9gdeYfXE39RexPBsfE9Cidu62mvB3krUGbkahWZmQrJP4P2IzuPycJ0Im9Ue6iDFDvNkBvSsdzTeEC40QT2M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710837067; c=relaxed/simple; bh=9eh9Mce20G8kV32TZt3BCMXWNixzHImnHuGbC8f5HvU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=PPK7dWIqVBLQWoc2nO/7paAE8JoC4uQkQNL88CmACnY7EmbT9Xm44E0GqDRDrYrjCKtFmI4ilWUx9g73uZ+DkjsE2+b5P3sM+7OIhWQrYfTauYEX+1F8ppSDT7NYXf0Uw8R+CKzIP0ZnpiVJoAQnOJq7k7vopHacMv/E96Yqhuo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=shopee.com; spf=pass smtp.mailfrom=shopee.com; dkim=pass (2048-bit key) header.d=shopee.com header.i=@shopee.com header.b=HZ3aT2qx; arc=none smtp.client-ip=209.85.216.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=shopee.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shopee.com Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-29fa98705b1so1370098a91.3 for ; Tue, 19 Mar 2024 01:31:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopee.com; s=shopee.com; t=1710837063; x=1711441863; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=iC286gqeu87dpLs4MzEjxy2NyBEm8le59VZf4WE61d0=; b=HZ3aT2qxzOrL49vlXpjp70a8VLhH7QgDgTtVSF9zZceluP8860pb8YHxsM47M7m8Vc CbTPrZbXh/oU48qCEHPqJbTRtAtVyDA6UzlEt0gA4W6Z6O7hNSys4Ba1DQVtkNLua4sX nHrv5CS4ikiO8VdX9ST1iQS4zJ7PrwU4i/OZHJeEVqvEVGpp7d1Acoeap+MO7jQ7s+WG HwZsU1PxKrvK0xHv/MTNXzP3KShwTTKhan/uPL+ievVCFAugYEKOoNQkWkfodjcq7IwN l9qFVyZDozSV8ds9gUEPGxzfZbORtH/sKDKQaX0w7QPx4A/S0Htis2r0evg7Z2rqOPCc R+Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710837063; x=1711441863; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iC286gqeu87dpLs4MzEjxy2NyBEm8le59VZf4WE61d0=; b=PgRSZPURJfVHS8YjYqFF9BlS6p9UwE6W6IWOd7guV9P+LAJIoiQ2NfG434dLF8A18a UN9p2EAlBqpBWWGrnQwgbFWsMTORlYS8D9wkuhDZ9/Vl+3w8rebmpz2rMuhhz0Bedkbo 1svUeC5jpS2fDiWfwQacMM65cTFE13AX1AAHYLYtNKcd0LJTnMcxoQqj5JkvixKqONxK i95wT02cWw3TxZR8LVbNHHrI5FQJd65T5FxHZCnJXn+PvTG9Nx2iSYFJkOFhhHauK8Nx 2TY57Vq1KUya7BshY1BGDFh9pUOU4g8vHgZoRLf7JW9n+nxw22a2W9zBnOBhgey3QqvO XSRA== X-Forwarded-Encrypted: i=1; AJvYcCV/ZC+g9OX2pqB6kOfpMwtDHeH3lmulUu5mZmvJcY78Peq3sXgojZ1EVsKwodJDpIuHxNIiFcv16qc4wbmr08/5gCmIb3mczTtAozWj X-Gm-Message-State: AOJu0Yyr2crXrWXNazJxb2do8YA6ljVoz/doIKlina9K2DkyZZhFY81y +4CKwBQOspGDLvjyxqPA6/BVf7JMaE7GWnIiiLIw7mWbii0HgNsgrlbXK8IInFs= X-Received: by 2002:a17:90a:c7cb:b0:29f:6753:ca66 with SMTP id gf11-20020a17090ac7cb00b0029f6753ca66mr1764789pjb.41.1710837062887; Tue, 19 Mar 2024 01:31:02 -0700 (PDT) Received: from seacloud.vm ([143.92.64.20]) by smtp.gmail.com with ESMTPSA id k90-20020a17090a4ce300b0029ddd0a6ed4sm9941249pjh.38.2024.03.19.01.30.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 01:31:02 -0700 (PDT) From: Haifeng Xu To: reinette.chatre@intel.com, james.morse@arm.com Cc: fenghua.yu@intel.com, babu.moger@amd.com, bp@alien8.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, hpa@zytor.com, peternewman@google.com, x86@kernel.org, linux-kernel@vger.kernel.org, corbet@lwn.net, linux-doc@vger.kernel.org, Haifeng Xu Subject: [PATCH v6 0/2] x86/resctrl: Track llc_occupancy of RMIDs in limbo list Date: Tue, 19 Mar 2024 16:30:37 +0800 Message-Id: <20240319083039.223088-1-haifeng.xu@shopee.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit After removing a monitor group, its RMID may not be freed immediately unless its llc_occupancy is less than the re-allocation threshold. If turning up the threshold, the RMID can be reused. In order to know how much the threshold should be, it's necessary to acquire the llc_occupancy. The patch series provides a new tracepoint to track the llc_occupancy. Changes since v1: - Rename pseudo_lock_event.h instead of creating a new header file. - Modify names used in the tracepoint. - Update changelog. Changes since v2: - Fix typo and use the x86/resctrl subject prefix in the cover letter. - Track both CLOSID and RMID in the tracepoint. - Remove the details on how perf can be used in patch2's changelog. Changes since v3: - Put the tracepoint in the 'else' section of the if/else after resctrl_arch_rmid_read(). - Modify names used in the tracepoint. - Document the properties of the tracepoint. Changes since v4: - Add Reviewed-by tags. - Include more maintainers in the submission. Changes since v5: - Update the documentation and comments of the tracepoint. - Code cleanup. Haifeng Xu (2): x86/resctrl: Rename pseudo_lock_event.h to trace.h x86/resctrl: Add tracepoint for llc_occupancy tracking Documentation/arch/x86/resctrl.rst | 6 +++++ arch/x86/kernel/cpu/resctrl/monitor.c | 11 +++++++++ arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 2 +- .../resctrl/{pseudo_lock_event.h => trace.h} | 24 +++++++++++++++---- 4 files changed, 38 insertions(+), 5 deletions(-) rename arch/x86/kernel/cpu/resctrl/{pseudo_lock_event.h => trace.h} (56%) -- 2.25.1