Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp347358rdb; Thu, 5 Oct 2023 07:42:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFX4ivdHxyUeZtLN/avzRL+rw+POBhgba2oKhEuj4Pbk0TW7D2S9IFjIsRfl/7SLU3XG5aU X-Received: by 2002:a05:6a00:3026:b0:693:3629:2939 with SMTP id ay38-20020a056a00302600b0069336292939mr1946704pfb.9.1696516927455; Thu, 05 Oct 2023 07:42:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696516927; cv=none; d=google.com; s=arc-20160816; b=iNa/Gfc7bbU+bX661NTIhnSWbYO3uoI2lP2GFnsLBvu86tsN4HP9yqpP3LG7SoaDH5 mHqJfgYoEqzJr7MmM9q2X2mhGLa4ZOawfivF2M1ieVcASAIB4u1jAqGBd/vP8SNcZEVh /n0Px3853ZE5aDZO3xfVNN1awfOO2SeVCPQPgnvkxkAduOlF7hBQsdDhk/MXdJjbgaK4 /PIQZH47LevxUpxPImgXGLwz0y7UOrAo9IJ/YwOIV7HYn49xbaFIwMzhtxY8KtqzwWPN 21XWAJ5zmvWtijhD2+34MOtRWGA4c2aYF5WnL7kkKAdSBfvhGy98XpsFZe9uMxk528Pq 9ZHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ew9CTKew+cNKDMIx1MC3uW3wssgAAZXIEhM/ZHhaWJ0=; fh=fdbks9cDZD3nws6fbVmPJcsGIn1evRgsQgeNrttrtE4=; b=zfhs6XXvKxCHh5OVEthifzpjUGCt3VZExTuFZDHXRHo7o7EpV3RteMf1JxFP1p72gC ddZxzhPMpoKYvLDGnXmq4XN178yKV8apky+tOa8WXJ6SHyUFch/QRmED6+NS6/ifxCxc Wp6XFvf1lrlowL/Dh4VbLpoLL5wQKciCAD7EESspZOCrJnQsKpVQYp3sgwqeZxnYCjGT Wvmoa8+JvegcZMP2jNf9tSReFvI7EkFdn/0oApHeWB6BnxeReXGzYqyBbtMjBdW1jwNE 69fq1C5btaJnmqsofxPyeZjhLvAa8p33Wn3AyWxmbmkj0nb6CIdUcdAqNXaybOYiXueR 5UfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="ZU/yLukF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id t184-20020a6381c1000000b00578b1a60710si1498076pgd.552.2023.10.05.07.42.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 07:42:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="ZU/yLukF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 6B8DF8098411; Thu, 5 Oct 2023 07:40:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236859AbjJEOhO (ORCPT + 99 others); Thu, 5 Oct 2023 10:37:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236353AbjJEOet (ORCPT ); Thu, 5 Oct 2023 10:34:49 -0400 Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 774E55FF4 for ; Thu, 5 Oct 2023 06:54:31 -0700 (PDT) Received: by mail-il1-x132.google.com with SMTP id e9e14a558f8ab-351367c1c24so83015ab.1 for ; Thu, 05 Oct 2023 06:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696514071; x=1697118871; 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=ew9CTKew+cNKDMIx1MC3uW3wssgAAZXIEhM/ZHhaWJ0=; b=ZU/yLukFeVmcKvKlY+iMHuAbTYDvxfieDlgQsMpJ/l59yvkp7yp3qnirhhTDkKvEKN tlwszgrbeFMamHOPP6NyY2EEpNYvwqB8+trVCm5BuKNLgKw7NoyG8JAfAOJj2Uz0UlJf 0h7yCoGtKHMHPgTTDJ6gEEHcR0teJh0m0R0qjoRYWdLgOEAgUL4yIAENpGZkp8xSkFpB 6bk+tb2qxjhK5iqQoyeYM819rAx9HjozH6hC9y1Ywjvqoksk6jng7YGX/gjTIvIiW+mS TTOnpZvU9Sn64KSiB22apUS0HnYlFPh+9X+qemU6Cgnf/w5XzVmF2Dwi5sk7/EhzEfxi gntQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696514071; x=1697118871; 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=ew9CTKew+cNKDMIx1MC3uW3wssgAAZXIEhM/ZHhaWJ0=; b=HzEo3XKghkFiaEpmXzcBCdLj7B6uoLRyl7+wXm8cieqrBFbRNf3x0kn77VMVyOv2Ej 0ULP+15E7Zk2P67drm1XAoLawGWkRjS1DFUEWvvCSOMIkVMaaM89gq19kIi3/3SNCw2k NXaf7MWuAokD52qonnwmyPEFYY+S4TMmMoifx2t7R3POfFzW6JLwOP4vRNC3HEZCkWtH 9/gXimZXh81gqk5Kh2ScU0pVUzLX4vL4ylf3IiK7SUhnVItn6IBMlMsziLmXRFuDrjw1 svYisEhW2C39Imkj3adTWWMsKKBlTMqr4YIKe6p/8a+WWaPJmKmEpya7m3eNHXlwgJ3T wYUg== X-Gm-Message-State: AOJu0YwvSoLldetZwAmGTt/PHonODkv3cuHvfNl+pWjMJvj4MAY83IFG uwQD95y+aC/Cm+yW5cOJtmNdUBMoIRroh0+7FDwlsQ== X-Received: by 2002:a05:6e02:1aa7:b0:34c:b016:ede5 with SMTP id l7-20020a056e021aa700b0034cb016ede5mr104452ilv.26.1696514070717; Thu, 05 Oct 2023 06:54:30 -0700 (PDT) MIME-Version: 1.0 References: <20230928191350.205703-1-tony.luck@intel.com> <20231003213043.13565-1-tony.luck@intel.com> <20231003213043.13565-9-tony.luck@intel.com> In-Reply-To: <20231003213043.13565-9-tony.luck@intel.com> From: Peter Newman Date: Thu, 5 Oct 2023 15:54:19 +0200 Message-ID: Subject: Re: [PATCH v8 8/8] x86/resctrl: Update documentation with Sub-NUMA cluster changes To: Tony Luck Cc: Fenghua Yu , Reinette Chatre , Jonathan Corbet , Shuah Khan , x86@kernel.org, Shaopeng Tan , James Morse , Jamie Iles , Babu Moger , Randy Dunlap , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 05 Oct 2023 07:40:34 -0700 (PDT) On Tue, Oct 3, 2023 at 11:30=E2=80=AFPM Tony Luck wro= te: > > With Sub-NUMA Cluster mode enabled the scope of monitoring resources is > per-NODE instead of per-L3 cache. Suffixes of directories with "L3" in > their name refer to Sub-NUMA nodes instead of L3 cache ids. > > Users should be aware that SNC mode also affects the amount of L3 cache > available for allocation within each SNC node. > > Signed-off-by: Tony Luck > > --- > > Changes since v5: > > Added addtional details about challenges tracking tasks when SNC > mode is enabled. > > --- > diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/= resctrl.rst > index cb05d90111b4..222c507089a5 100644 > --- a/Documentation/arch/x86/resctrl.rst > +++ b/Documentation/arch/x86/resctrl.rst > @@ -345,9 +345,9 @@ When control is enabled all CTRL_MON groups will also= contain: > When monitoring is enabled all MON groups will also contain: > > "mon_data": > - This contains a set of files organized by L3 domain and by > - RDT event. E.g. on a system with two L3 domains there will > - be subdirectories "mon_L3_00" and "mon_L3_01". Each of these > + This contains a set of files organized by L3 domain or by NUMA > + node (depending on whether Sub-NUMA Cluster (SNC) mode is disable= d > + or enabled respectively) and by RDT event. Each of these > directories have one file per event (e.g. "llc_occupancy", > "mbm_total_bytes", and "mbm_local_bytes"). In a MON group these > files provide a read out of the current value of the event for > @@ -452,6 +452,23 @@ and 0xA are not. On a system with a 20-bit mask eac= h bit represents 5% > of the capacity of the cache. You could partition the cache into four > equal parts with masks: 0x1f, 0x3e0, 0x7c00, 0xf8000. > > +Notes on Sub-NUMA Cluster mode > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > +When SNC mode is enabled Linux may load balance tasks between Sub-NUMA > +nodes much more readily than between regular NUMA nodes since the CPUs > +on Sub-NUMA nodes share the same L3 cache and the system may report > +the NUMA distance between Sub-NUMA nodes with a lower value than used > +for regular NUMA nodes. Users who do not bind tasks to the CPUs of a > +specific Sub-NUMA node must read the "llc_occupancy", "mbm_total_bytes", > +and "mbm_local_bytes" for all Sub-NUMA nodes where the tasks may execute > +to get the full view of traffic for which the tasks were the source. > + > +The cache allocation feature still provides the same number of > +bits in a mask to control allocation into the L3 cache. But each > +of those ways has its capacity reduced because the cache is divided > +between the SNC nodes. The values reported in the resctrl > +"size" files are adjusted accordingly. > + > Memory bandwidth Allocation and monitoring > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Sounds better, thanks. Reviewed-by: Peter Newman