Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16088783rwd; Mon, 26 Jun 2023 05:44:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6YzMHvBc9IrI5n32dbcXu7U5S0plTv4eDw7VN6gQktsYmNx/gJ6UN8/h0Evxe0bKsPWQi0 X-Received: by 2002:a17:907:1612:b0:98d:cd3e:c193 with SMTP id hb18-20020a170907161200b0098dcd3ec193mr6594870ejc.46.1687783467387; Mon, 26 Jun 2023 05:44:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687783467; cv=none; d=google.com; s=arc-20160816; b=tduysM0RStx2/gP5C2lEt0Pv/zcSifTG3DZs3qs3jmUJAF1YU+kk3pDcxgM3AhFouW xjdcdW6rec4xvNqTr7bXhp36BFRXtfpqvNnxAXWfxEZbMJ5B/t44i0lacOjukxi9XnY3 P4zvGRv3DQ7Pp+W1bnXT19iHu00EwHEvsXO0hX7Z0ZWrW+ojRZWc3Y30FhMzJp6lsLJn bpTRX8UD7t4nw+LX8wtcp/hfq9J6coxZkdJznj60EkRMRVx2qkgcdnsk+/2UieCl8qcz ZpSfnIZBv5IZSBFP7FAdwUK98zHneZnLhy7moapXTc740XgxTlWx21HF3GHixFGEGLbv UmeA== 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=/NL1ZhGwp5p1Bk1jm8YK95c2hrmINT6w/AO1rizscdM=; fh=Nlj0KWtA80t2cmXpaJwIzKDuRrn4bOmBcVO/ZfCh3vo=; b=XvYL8piPJrJw/+uiUlbDF/PwZLWqU/bh3/yOSZgLvRJCzlxQleSvfpcfS+buG+NQjS y+Y98QRApiWcdidPSuml0p8083T6zZ/qXTFMVU3lQxkNSNVV+EFvOjScvor6VSmQk2S0 uQ7dt8cb0s2IJU4K/5ePsC5bWHSvf27KGRhIq/gwBlm+yUjz4c0j6d8Gg5vMaYuwlc7h d9Y0+J9ZVlbOPUxPLEBKrkJyvX8h84pt2fbXaEM17cDynxwrDsngQBffn4yNZN4g1XWx yb12jkI77Czt+YRWNAE6Taxjwhu2cvO9IzVt20HnGF2vk7yoGWjFuVzK7su41UE4F5eS XdBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=2+r78Aqf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t16-20020a170906269000b00977ebf6b906si2488797ejc.887.2023.06.26.05.44.01; Mon, 26 Jun 2023 05:44:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=2+r78Aqf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229667AbjFZMS7 (ORCPT + 99 others); Mon, 26 Jun 2023 08:18:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbjFZMSo (ORCPT ); Mon, 26 Jun 2023 08:18:44 -0400 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C61A1709 for ; Mon, 26 Jun 2023 05:18:17 -0700 (PDT) Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-40079b6fc56so378101cf.1 for ; Mon, 26 Jun 2023 05:18:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1687781892; x=1690373892; 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=/NL1ZhGwp5p1Bk1jm8YK95c2hrmINT6w/AO1rizscdM=; b=2+r78AqfAQbVwe38A471bVTPTRy6Tz06JLOVBp5eRvWTq40ptutz99SDdtYiEBzpn0 1033/ZvHRvxr4lkU6EiqjUfKLL7wGEVrU41Yii5QKSAzYemeyiODMQYpej9HxjqvUtfd GXqCuh0CWkUZ5Lzcw5owTf2s05OAeK6pBfoY2ZhKkr7WNZpSRgE6zbbklgAhR9DD7HM1 b3flBGLCddXNiXYtHWxZ7IduwRuD6IcREkud6bClQ8nRAJxs2Gev/ybra78jom/y/DBm wYcMoLR059DdPKt5Wx5t6ciPLimGdtecNN0s4GsEa7xWiyQUquOyRdazJ42W4sCaaXT+ 4vDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687781892; x=1690373892; 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=/NL1ZhGwp5p1Bk1jm8YK95c2hrmINT6w/AO1rizscdM=; b=e1Wramfg/TrU09+JjmwB2fDZqHfyiqnDR8bCa2QAfxS+k5j9Fk4NazDFsuL5V2+wV6 f9CbGwKXpz3jhr8Nf2ECO7pJpIpLsmZrWexuM7CQqrHFDaUmvkGcBmLCF8JXzJxR9Sih vgbcBtKwMyFDP1tkmut1tR35YGh8FhYoavoaOIZWHws9iTbrRZJi8EqFwrhxZijwhnz3 LXq8xcjOfzhZwf0FkUOqenC9tj7ElrVchADYFK+qhOdqGFEab+7HLORjc2ZRZT7aacp/ LcneJg44eLoKhxCVV2iQxLjCNe0Y/u1ZJMHrz46RUMyBK662fNPwHgldQkGEMIpGr0wj 6TIg== X-Gm-Message-State: AC+VfDy6W3Dz5qoIz5iXkkJWgi8oaS6y5muPfqHwfYfUYF4BcymOis6V nxIUv7ExMK07UbhKVSfDqpWaamDMK7tEZDHvzpCCYA== X-Received: by 2002:a05:622a:40b:b0:3fd:ad1b:4e8a with SMTP id n11-20020a05622a040b00b003fdad1b4e8amr70924qtx.22.1687781892621; Mon, 26 Jun 2023 05:18:12 -0700 (PDT) MIME-Version: 1.0 References: <20230621174006.42533-1-tony.luck@intel.com> <20230621174006.42533-8-tony.luck@intel.com> In-Reply-To: From: Peter Newman Date: Mon, 26 Jun 2023 14:18:01 +0200 Message-ID: Subject: Re: [PATCH v2 7/7] x86/resctrl: Determine if Sub-NUMA Cluster is enabled and initialize. To: Tony Luck Cc: "Yu, Fenghua" , "Chatre, Reinette" , Jonathan Corbet , "x86@kernel.org" , Shaopeng Tan , James Morse , Jamie Iles , Babu Moger , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "patches@lists.linux.dev" , "Eranian, Stephane" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tony, On Fri, Jun 23, 2023 at 10:20=E2=80=AFPM Tony Luck wr= ote: > On Fri, Jun 23, 2023 at 05:19:37PM +0200, Peter Newman wrote: > > On Thu, Jun 22, 2023 at 6:02=E2=80=AFPM Luck, Tony wrote: > > > > > > > Unfortunately I'm not getting as good of results with the new serie= s. > > > > The main difference seems to be updating the 0xca0 MSR instead of > > > > applying the offset to PQR_ASSOC. > > > > > > I think I may have reversed the actions to update the MSR in one of > > > my refactor/rebase. The comment here is correct, but that's not > > > what the code is doing :-( > > > > > > Can you swap the bodies of these two functions and retest? > > > > It's a small improvement, but still not great. Still only node 0 > > giving believable results, but at least no more empty results from the > > second package. > > > > I poked around in /proc/kcore and noticed that my snc_ways is still 1, = though. It turns out I just forgot that I had KASLR on. snc_ways was in fact 2. The real problem was my test program was assuming that the absence of the snc_ways file meant no SNC, so it was using cache IDs instead of node IDs when choosing a mon_data subdirectory to read results from. With that fixed, the results look good: cpu: 95 (3), rmid: 17 (g16): 0 -> 32313974784 (32313974784) cpu: 198 (3), rmid: 103 (g102): 0 -> 26078961664 (26078961664) cpu: 117 (0), rmid: 59 (g58): 0 -> 26692599808 (26692599808) cpu: 152 (1), rmid: 113 (g112): 0 -> 33368244224 (33368244224) cpu: 33 (1), rmid: 77 (g76): 0 -> 26902077440 (26902077440) cpu: 63 (2), rmid: 76 (g75): 0 -> 32478494720 (32478494720) cpu: 90 (3), rmid: 94 (g93): 0 -> 31206088704 (31206088704) cpu: 136 (0), rmid: 13 (g12): 0 -> 28095463424 (28095463424) cpu: 37 (1), rmid: 177 (g175): 0 -> 31255060480 (31255060480) cpu: 124 (0), rmid: 6 (g5): 0 -> 31128502272 (31128502272) cpu: 102 (3), rmid: 68 (g67): 0 -> 28848963584 (28848963584) cpu: 103 (3), rmid: 62 (g61): 0 -> 26091233280 (26091233280) cpu: 71 (2), rmid: 123 (g122): 0 -> 29157933056 (29157933056) cpu: 94 (3), rmid: 69 (g68): 0 -> 27776458752 (27776458752) cpu: 102 (3), rmid: 174 (g172): 0 -> 26349281280 (26349281280) cpu: 155 (1), rmid: 3 (g2): 0 -> 33489125376 (33489125376) cpu: 40 (1), rmid: 16 (g15): 0 -> 27142750208 (27142750208) cpu: 69 (2), rmid: 156 (g154): 0 -> 29294411776 (29294411776) cpu: 121 (0), rmid: 63 (g62): 0 -> 30636777472 (30636777472) cpu: 171 (2), rmid: 93 (g92): 0 -> 26103046144 (26103046144) (and it turns out I never needed to manually look up the node IDs, because the test output would have already told me, had the test been working correctly) Sorry for the extra trouble. The series works well for me. Tested-By: Peter Newman Thanks! -Peter