Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1151074ybi; Wed, 19 Jun 2019 14:35:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPto2JBoXuiJ7cIDEv/Q76mxVroZabUNPFyn5xSTsqRJ0X9UGL01QvHoTy4p/DgvUfNrXq X-Received: by 2002:a63:1c59:: with SMTP id c25mr9542609pgm.395.1560980140552; Wed, 19 Jun 2019 14:35:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560980140; cv=none; d=google.com; s=arc-20160816; b=0XSsI4QH1yTsXxs31gNu4zOTIGoxxFdFhnffWwixhrOTEVnX5BIsJmwhaOP0uUuC1n b8Oaoblg3OCdCTG5qq+l6lXiJCr8bhAIr/JeYSSUCUuFPofzWV0evBzAMTEjB4mjtmGl EukGxVqWVjs+ZwBB+PUgcmzfSPlrdQqnQye/T2hYZUG4AddSkYcMRnEiANG1LFkCKs+2 wmMzsoVVc/X3rqzivjPU8EpiXgy9l6L/JKebrEz0at98cGtwGuAJA1vDD02cU0wOGblY BapMGfoksH6hoC8HuvKn5hOHoF4Hy5h8u7paZkTJX1pwtGCaZHMoNIG+qNrx/o7gYcFu X3mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4YTe0mi4ZxYNQPShR/fx2ImvNIhyeL2zs0OLpOYBsos=; b=RkLlKvn0adDZSIlZF3GoYneuqxFJS8aLyKDBemmc+6M0Q6QeGvjNceSI/OthcVpU91 o9SYGyeRqBtgd3K0BeLXJ/xqZnnAtOE6A+qETUaY4EAfUVio5CkXHwUJkAAA6mhDoIju RvqJh6ZzYpSVcFhNvGTgMHLhw0P1FgIr1dad7HTxqCY3kbCD0DA7oWWNYGQSKsAXXVHe KKvX8o0RRhP5hVfgxMMBZLJEhzfiw8v20H8sWtiL4yF8NyHnbxFReKBbz2Tabg3F0Bfg 6O5lPREgZ4m6HlrAtVlLyILgj3+rJc4PJK+S/pJrEfFA/USyXVnFq/pYHd/RkeWGTo6b 3vBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeblueprint-co-uk.20150623.gappssmtp.com header.s=20150623 header.b=bi0a8D3x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q28si3812801pgb.375.2019.06.19.14.35.24; Wed, 19 Jun 2019 14:35:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeblueprint-co-uk.20150623.gappssmtp.com header.s=20150623 header.b=bi0a8D3x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730611AbfFSVeo (ORCPT + 99 others); Wed, 19 Jun 2019 17:34:44 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:37781 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726246AbfFSVen (ORCPT ); Wed, 19 Jun 2019 17:34:43 -0400 Received: by mail-pg1-f194.google.com with SMTP id 145so373073pgh.4 for ; Wed, 19 Jun 2019 14:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeblueprint-co-uk.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4YTe0mi4ZxYNQPShR/fx2ImvNIhyeL2zs0OLpOYBsos=; b=bi0a8D3x1KgFO63QC0XpxHJIQkVcye5xXvU3rqa8RRDg9t8A70k+pnRA8FS/QqzAL6 qJXHfM42VK1PvSYQonU8I1zwSmAWKY9M07YBfd8vcohLbG8RpkORCL7itDWqxv0+Droc sJO/UBTeDjuagFCmSHTp0ZuVjhTIB/2PrfY0ECtGJC5rxtXiTPkHTvDEPseYrYuZr8co ENTlFqtXbT4gd2kbq/6j6KJNgFV24NPkXwRO4ern0Ge+wgX+USFxewDblaNWpJ57pcVG TYlchEzPjorf+uB1nKgO8L1OU0amFk/iO9kTwTn+oCJYaPuzrPJDZ2/zqXn4Yg5VfktI RmTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4YTe0mi4ZxYNQPShR/fx2ImvNIhyeL2zs0OLpOYBsos=; b=KfUl0zXrCrYF689IcNO2Pz5PKOZj1i0TZIkKjQ+TnVXhE3tmP2ks1Qn7jv6xOZdTtM 87bgiV5zkBMzEwFxW3/KeqwW27A4cMk+dilVPoXpQL2MsCXLRAUJT4KjTnyRiw3KtKzl PFzNd8VUW2FwyweE0cZUhyugu+ld0YapT1wBlmDOEbGFb/tquWgCv07ojSZOBBv8biw0 tP6QLTjKrzLbCQWSvh2m8sFZjmLkgb/Mp1HLNPcwW9zNdBOGyXmc+dMNpP0SZlspIPp8 U3RpYeyFwdEsbUNYL3P673KcL+KywQQhWWxIOnBFwYfPhOL0trUdrwr9aIU/9+zCv/5K 3cIg== X-Gm-Message-State: APjAAAXh/hV8LagNlJnxrpYic01KSO23s+BFFaj5OHE7nxkxaa9vvLNB V9ivv3OEYSS95IEY2ayfC2ecqhbPULo= X-Received: by 2002:a63:a1a:: with SMTP id 26mr9500823pgk.265.1560980082749; Wed, 19 Jun 2019 14:34:42 -0700 (PDT) Received: from localhost ([94.1.151.203]) by smtp.gmail.com with ESMTPSA id q63sm14018422pfb.81.2019.06.19.14.34.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Jun 2019 14:34:42 -0700 (PDT) Date: Wed, 19 Jun 2019 22:34:37 +0100 From: Matt Fleming To: Peter Zijlstra Cc: "Lendacky, Thomas" , "linux-kernel@vger.kernel.org" , "Suthikulpanit, Suravee" , Mel Gorman , Borislav Petkov Subject: Re: [PATCH] sched/topology: Improve load balancing on AMD EPYC Message-ID: <20190619213437.GA6909@codeblueprint.co.uk> References: <20190605155922.17153-1-matt@codeblueprint.co.uk> <20190605180035.GA3402@hirez.programming.kicks-ass.net> <20190610212620.GA4772@codeblueprint.co.uk> <18994abb-a2a8-47f4-9a35-515165c75942@amd.com> <20190618104319.GB4772@codeblueprint.co.uk> <20190618123318.GG3419@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190618123318.GG3419@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Jun, at 02:33:18PM, Peter Zijlstra wrote: > On Tue, Jun 18, 2019 at 11:43:19AM +0100, Matt Fleming wrote: > > This works for me under all my tests. Thoughts? > > > > --->8--- > > > > diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c > > index 80a405c2048a..4db4e9e7654b 100644 > > --- a/arch/x86/kernel/cpu/amd.c > > +++ b/arch/x86/kernel/cpu/amd.c > > @@ -8,6 +8,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -824,6 +825,8 @@ static void init_amd_zn(struct cpuinfo_x86 *c) > > { > > set_cpu_cap(c, X86_FEATURE_ZEN); > > > > I'm thinking this deserves a comment. Traditionally the SLIT table held > relative memory latency. So where the identity is 10, 16 would indicate > 1.6 times local latency and 32 would be 3.2 times local. > > Now, even very early on BIOS monkeys went about their business and put > in random values in an attempt to 'tune' the system based on how > $random-os behaved, which is all sorts of fu^Wwrong. > > Now, I suppose my question is; is that 32 Zen puts in an actual relative > memory latency metric, or a random value we somehow have to deal with. > And can we pretty please describe the whole sordid story behind this > 'tunable' somewhere? This is one for the AMD folks. I don't know if the memory latency really is 3.2 times or not, only that that's the value in all the Zen machines I have access to. Even this 2-socket one: node distances: node 0 1 0: 10 32 1: 32 10 Tom, Suravee?