Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2147921pxb; Mon, 12 Apr 2021 16:04:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFtts3fVXwIgaoOwK+o3Ie5cvxrL5iVk422eLeta1k+93Cxo3DSko+RXQ0wpcso/nZqLTY X-Received: by 2002:a05:6a00:bcb:b029:24c:d34:1036 with SMTP id x11-20020a056a000bcbb029024c0d341036mr8093870pfu.17.1618268644393; Mon, 12 Apr 2021 16:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618268644; cv=none; d=google.com; s=arc-20160816; b=CQbFAb+yGB0kOsWPSSnYOqS60sSOlW5o6mF+POOiuwxvGiY8gpVGbqlkolEqDZ7Yy6 Y5F/GlOGfg1hXQlIq00gq+IUjEhgOLVRidA/LEVRVltWnaMk36tDnnGAySZwD2EpsHRA Vf11hAGnx6bjs7GC1+US5rOjyo+j1Yxp3G4pnRgmup2/hYb9gzhpw25O8SE6ixvxvfbq ikVaszk7yW+cm4NxPnX0Kp7+pIVktWY56eLBEale8606aT+liAUcElUYwTi6lvbvJAYR cbMMOracnuFsOsYdRLKnBUnLmMhrbwlL2JvtCoHaaFGErDlZA2VqpnI6U/OkmXQgMPfH qP7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=oNVKPmXPyRvvswzRD5nBzyJlgjLl+XzFhQn/gUXWidE=; b=qQlU7Y0r6auZqrGBGhl6nqmTG3qChoOnBXl6LPDZ0YmvcqlJCJjv4xjYKABMhEYgWN iU+YHRKAYV8bcpb7JdRdjtOhjYqFJS/wsdNK72Kn89Ml04oermtl+0nLZucvE0DVF0Yf aY/S7m77Wn1xkTMeSTfS7DztH84h59HhUOo6HQu+9P1Y1wLfa9Ghx4IDDkXixZWVSzRS ssQyCVBKBnjfrVQVP1lkosp6l6BNJQ1KlF+UAHHr+h7RTf5A3weBAeqRIYYrVpRXZ84P q0VMTnvLJxlNdtfBx2rgl1OHyEvLgU1mXWtXrP0PwZB9M2he6tcfzpJ5euGvtOK85fgd ip3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x10si15155588plv.429.2021.04.12.16.03.51; Mon, 12 Apr 2021 16:04:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242603AbhDLJuf (ORCPT + 99 others); Mon, 12 Apr 2021 05:50:35 -0400 Received: from outbound-smtp08.blacknight.com ([46.22.139.13]:33467 "EHLO outbound-smtp08.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237939AbhDLJho (ORCPT ); Mon, 12 Apr 2021 05:37:44 -0400 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp08.blacknight.com (Postfix) with ESMTPS id 62ED51C4FAC for ; Mon, 12 Apr 2021 10:37:24 +0100 (IST) Received: (qmail 24080 invoked from network); 12 Apr 2021 09:37:24 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 12 Apr 2021 09:37:24 -0000 Date: Mon, 12 Apr 2021 10:37:22 +0100 From: Mel Gorman To: Srikar Dronamraju Cc: "Gautham R. Shenoy" , Michael Ellerman , Michael Neuling , Rik van Riel , Valentin Schneider , Vincent Guittot , Dietmar Eggemann , Nicholas Piggin , Anton Blanchard , Parth Shah , Vaidyanathan Srinivasan , LKML , linuxppc-dev@lists.ozlabs.org Subject: Re: [RFC/PATCH] powerpc/smp: Add SD_SHARE_PKG_RESOURCES flag to MC sched-domain Message-ID: <20210412093722.GS3697@techsingularity.net> References: <1617341874-1205-1-git-send-email-ego@linux.vnet.ibm.com> <20210412062436.GB2633526@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20210412062436.GB2633526@linux.vnet.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 12, 2021 at 11:54:36AM +0530, Srikar Dronamraju wrote: > * Gautham R. Shenoy [2021-04-02 11:07:54]: > > > > > To remedy this, this patch proposes that the LLC be moved to the MC > > level which is a group of cores in one half of the chip. > > > > SMT (SMT4) --> MC (Hemisphere)[LLC] --> DIE > > > > I think marking Hemisphere as a LLC in a P10 scenario is a good idea. > > > While there is no cache being shared at this level, this is still the > > level where some amount of cache-snooping takes place and it is > > relatively faster to access the data from the caches of the cores > > within this domain. With this change, we no longer see regressions on > > P10 for applications which require single threaded performance. > > Peter, Valentin, Vincent, Mel, etal > > On architectures where we have multiple levels of cache access latencies > within a DIE, (For example: one within the current LLC or SMT core and the > other at MC or Hemisphere, and finally across hemispheres), do you have any > suggestions on how we could handle the same in the core scheduler? > Minimally I think it would be worth detecting when there are multiple LLCs per node and detecting that in generic code as a static branch. In select_idle_cpu, consider taking two passes -- first on the LLC domain and if no idle CPU is found then taking a second pass if the search depth allows within the node with the LLC CPUs masked out. While there would be a latency hit because cache is not shared, it would still be a CPU local to memory that is idle. That would potentially be beneficial on Zen* as well without having to introduce new domains in the topology hierarchy. -- Mel Gorman SUSE Labs