Received: by 2002:a05:7208:c24f:b0:81:d631:dc8 with SMTP id w15csp391854rbd; Thu, 4 Apr 2024 12:19:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXr7MC2LKlYg00mKdaxHEaQYQoY3z7WFNj4bZ7FI2PBfLZOmViEj8TyKT/m8hmNQfbEjCv7APSJY2W8thkzbBEuWQV0GL/EMTXW36DPOA== X-Google-Smtp-Source: AGHT+IGHu8EfBG9A+1J0tB3X3xanbbTaV/OlMhBC4Q3JygI4L7NaPxbQn1UG6YT3NdxPo4eOXskD X-Received: by 2002:a17:903:244a:b0:1dd:dde1:31dc with SMTP id l10-20020a170903244a00b001dddde131dcmr3211122pls.26.1712258366598; Thu, 04 Apr 2024 12:19:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712258366; cv=pass; d=google.com; s=arc-20160816; b=oubqEQDu6Ezgu5L6g0QNRyeJkJ57iVVJUw5JCpK3XSfNYbiN+X8TSZqvqvOEHxwBzL HB8P/Vvl42iiFxYiJa2mXn3BBXSqUqMNNer47un3mRYe5X0ITe9le+Uf1r5ETILb0ZyL y4Ah6wVl8J+5DfLiTH3VJbudB552dBStNtW/cT+kScdGgDGlK3vmmb1OPaEw1VWLeU2S m0j8+TVJDJ67usAAfyYxqskyUUq6QdoGPPKR2UUVg3sDK2iHiXj3gyfzs62gIDronvKj EhN+LdTCrGdnHZXt/AFbcJ11NURXbSduYzDfU1uujzCKow/lTbDkOiF2xxjPKBoV03+f XdSQ== ARC-Message-Signature: i=2; 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=+2FS3zsbt8L4jeaVkTvzqGihSw/YCQu8ub3DPuvSaF0=; fh=gItves/YDphVxr64EFAIkDUknZfNTfgdR8LhQ1vyVDQ=; b=bgDkoF9OYJLNbDizBboYppYI6NpXTG+2vB7/azrPm1QghVlsDvVyJjBZ5G+x/D+TFv 9RTOJegviyE3JbYv9PUfqns4Eg2nN0pKDxUtYm7TPtuEGbgqiZ4uAgJlbnM1cYxoGfcG 41l5fHTopqLwR/Ib6/2lX2RCV4+wcB/OY8RYwSB2IF6fl7iNzRj9LCPYAnQGyG7m7zkj 1wnYu8l0en4eahio2gLTYQAQI9P7QnNBdffIU4qbARLO0WwEo18wnR3rJZ8EJ6qnZ39W yi2ilnLLOU0S7bxqL/Cg9uMvx9sC17PNbzk6AJBvMhig865BrH+8SAsZorSmUnmlPhve Niow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=uZdo5tf2; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-132012-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132012-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id lq6-20020a170903144600b001e2a5f0c8b4si2401005plb.150.2024.04.04.12.19.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 12:19:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132012-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=uZdo5tf2; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-132012-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132012-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A33A928FBA5 for ; Thu, 4 Apr 2024 19:09:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB3F8133420; Thu, 4 Apr 2024 19:08:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="uZdo5tf2" Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) (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 5A1D51332BA for ; Thu, 4 Apr 2024 19:08:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712257736; cv=none; b=gdUOWsdE4fGq4MF33CD3Ax+MevYACUL1IqCsETphvdhn7oCd/qBS94ZWnfrfeebecbYDdVLLEzcClGmJsYYqqtjdXInI+ZNYP0gVEO2chofEO71E5j2mSwaJ/QkmNb4vLnX0LdhSYR2GyZF8pckGqAiAEAJDPC7I6yaJzyKiAFc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712257736; c=relaxed/simple; bh=WxeAqvvN/v7ktneYk9JoOYaf4wH/gjJj72H4zKdF+ik=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=KWNlEk5c7VeL8T3t2pLNjehcECC2+/YwcCjcJTTrLc8jD1zH7BYf9GlfP5za5ybu9HQOdIMlVl2vJ160IhcRDsZT4MYZoL3gff9YtAhcKJELgjeUJ75eK0pV98nXAcyQowGWV5A5aiZWgkoO1tcm/0SxDGzINyia84iMkh/z4Tk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=uZdo5tf2; arc=none smtp.client-ip=209.85.160.173 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-qt1-f173.google.com with SMTP id d75a77b69052e-431347c6c99so58561cf.0 for ; Thu, 04 Apr 2024 12:08:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712257734; x=1712862534; 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=+2FS3zsbt8L4jeaVkTvzqGihSw/YCQu8ub3DPuvSaF0=; b=uZdo5tf2PBHHmoUmpJYi/ZNTG+TcIConAiXCqPIOzIWxY1KUS1/Wq+LsVpFt/RChqZ AjUG3doKkyIN/bEz1rNe0wY+LcqMo1GCJNc7y0Ga8HRHHXa0KzVusB4YpeX1pSwM5vNc Dux85gt4wWQjGuPW1EQUz+Q5JGX+PfylOdZy5nEBscoMRvb7T9y5ZD/PDz5hmr4oP3la ZGe7aaV8slzvtzDu1sWDEqHAqnf3pXP+yXZFrYMG09JoVQCVVnH2wHrceDaunlXc2x4Y Wnu2GJDq8oCC9WpN9b90vO3L1Ce7PfsqtnOY3g0+YJm4ek/L1Q0/s//jI5LK0zbtYbxg eNmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712257734; x=1712862534; 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=+2FS3zsbt8L4jeaVkTvzqGihSw/YCQu8ub3DPuvSaF0=; b=fT7mAopPWrfl4mI35nkg4zi4YuoDXBIqhijjLfQMC7H4/tTp+oGAz0Npein2694yRv +W+pHbdlwH9EXFHVVl1U6cGcRHksZ2mA7aSJDjqOFvc2Zk/Hygff2eyNEOaau8w818xK 0HvJztGspfWPSWhN/YcJFmLcrRYrHVM2tUW2BwhYAUI7XpACdag8xp6L4l80stnnJCiU h9qGXSvMjU7K5VjEp4R+hAUXkbOhir5hNGtXGQdHapFOEpnIGCqkYC/Fz3UZEVKoCHmO IPYJfNBC8waKY0BGsEDcZzcFfNOWT59qBBgflAGVDcxG8zMetCve1mIaylhSrAFIaDjV VuPg== X-Forwarded-Encrypted: i=1; AJvYcCUkdjMCAYvGUZ4EAGPWw0GR+mwFXwhOWY40/27CGte2dTmu9iSF/+DM6k0zMgGipPLRc+QLLEz5qd03PqfoPObHVFBzy0w4OfiTnDg7 X-Gm-Message-State: AOJu0YxYJT6nf3QnIvpJP3sjqyZQFh8Y/TuTBUzVXXP/daWk3vOPWE8c 4sExbCM+pp263Td5R0zip48m1teCE5gJjf9ysntaEuG4guLAqma5+lTeVioJRuXgszTGA2XZmHG FDa9UOp5ZJD8vq5uuL3vsyHpNClFYtinJALLA X-Received: by 2002:a05:622a:1a82:b0:434:5c3f:6d55 with SMTP id s2-20020a05622a1a8200b004345c3f6d55mr7835qtc.1.1712257734134; Thu, 04 Apr 2024 12:08:54 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Peter Newman Date: Thu, 4 Apr 2024 12:08:43 -0700 Message-ID: Subject: Re: [RFC PATCH v3 00/17] x86/resctrl : Support AMD Assignable Bandwidth Monitoring Counters (ABMC) To: Babu Moger Cc: corbet@lwn.net, fenghua.yu@intel.com, reinette.chatre@intel.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, paulmck@kernel.org, rdunlap@infradead.org, tj@kernel.org, peterz@infradead.org, yanjiewtw@gmail.com, kim.phillips@amd.com, lukas.bulwahn@gmail.com, seanjc@google.com, jmattson@google.com, leitao@debian.org, jpoimboe@kernel.org, rick.p.edgecombe@intel.com, kirill.shutemov@linux.intel.com, jithu.joseph@intel.com, kai.huang@intel.com, kan.liang@linux.intel.com, daniel.sneddon@linux.intel.com, pbonzini@redhat.com, sandipan.das@amd.com, ilpo.jarvinen@linux.intel.com, maciej.wieczor-retman@intel.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, eranian@google.com, james.morse@arm.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Babu, On Thu, Mar 28, 2024 at 6:07=E2=80=AFPM Babu Moger wro= te: > The list follows the following format: > > * Default CTRL_MON group: > "//=3D" > > * Non-default CTRL_MON group: > "//=3D" > > * Child MON group of default CTRL_MON group: > "//=3D" > > * Child MON group of non-default CTRL_MON group: > "//=3D" > > Assignment flags can be one of the following: > > t MBM total event is assigned > l MBM local event is assigned > tl Both total and local MBM events are assigned > _ None of the MBM events are assigned > > Examples: > > # cat /sys/fs/resctrl/info/L3_MON/mbm_assign_control > non_defult_group//0=3Dtl;1=3Dtl;2=3Dtl;3=3Dtl;4=3Dtl;5=3Dtl;6=3Dt= l;7=3Dtl; > non_defult_group/non_default_mon1/0=3Dtl;1=3Dtl;2=3Dtl;3=3Dtl;4= =3Dtl;5=3Dtl;6=3Dtl;7=3Dtl; > //0=3Dtl;1=3Dtl;2=3Dtl;3=3Dtl;4=3Dtl;5=3Dtl;6=3Dtl;7=3Dtl; > /default_mon1/0=3Dtl;1=3Dtl;2=3Dtl;3=3Dtl;4=3Dtl;5=3Dtl;6=3Dtl;7= =3Dtl; > > There are four groups and all the groups have local and total eve= nt assigned. > > "//" - This is a default CONTROL MON group > > "non_defult_group//" - This is non default CONTROL MON group > > "/default_mon1/" - This is Child MON group of the defult group > > "non_defult_group/non_default_mon1/" - This is child MON group of= the non default group > > =3Dtl means both total and local events are assigned. I recall there was supposed to be a way to perform the same update on all domains together so that it isn't tedious to not do per-domain customizations. (And also to avoid serializing programming all the domains the same way.) > > .../admin-guide/kernel-parameters.txt | 2 +- > Documentation/arch/x86/resctrl.rst | 144 ++++ > arch/x86/include/asm/cpufeatures.h | 1 + > arch/x86/include/asm/msr-index.h | 2 + > arch/x86/kernel/cpu/cpuid-deps.c | 3 + > arch/x86/kernel/cpu/resctrl/core.c | 25 +- > arch/x86/kernel/cpu/resctrl/internal.h | 56 +- > arch/x86/kernel/cpu/resctrl/monitor.c | 24 +- > arch/x86/kernel/cpu/resctrl/rdtgroup.c | 714 +++++++++++++++++- > arch/x86/kernel/cpu/scattered.c | 1 + > include/linux/resctrl.h | 12 + > 11 files changed, 964 insertions(+), 20 deletions(-) > > -- > 2.34.1 > This should be fine for me to get started with. I'll see if I can work backwards from the patches adding the parsing code to see how I'll work the software implementation in. Thanks! -Peter