Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3315684rdb; Tue, 6 Feb 2024 13:55:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKqEpSk7+ojwgP/AEP4gjTiQdWpUlq531aDj4yFF1KUbaZBmjqrAlAGz8PApZH0g0Efn3q X-Received: by 2002:a17:90a:4386:b0:296:1667:f21d with SMTP id r6-20020a17090a438600b002961667f21dmr937485pjg.5.1707256553604; Tue, 06 Feb 2024 13:55:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707256553; cv=pass; d=google.com; s=arc-20160816; b=WGSzDLc1PjDdvkI4ARagkMnThh42S5XLkVBkr+INQDG5VRE9Ncv+fIg9NkSIFHL5rx IaVkRZsERO/7A5rx4emWYEoOe6SmjslaGHm//s0VR2IfCd/qMeWpXNZbL97+2FRrLyMW sFDl93vT7x5WXR3Rks/hz0I88UE/Bqg1os+Vj7oWNC0QzA0qoaWF840+T8o7BjDNLWMV J5Yi+ktdnm5dPk8BHj6cu2V0NoNFpe9j0HbQ+kYnBEoSOmqmtQu9ni2Fdz4O2vKqfRxV vHrl1wR+ctbNcXUg7tJHl0cG0vBJFU8NkEXTLIy889NiYf6WhW5X3LtHrHsSMbcf21WQ xCLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=ZHQP8YCFpYk+JMnznFdjc70bpcaN7mC9aIo6+Q5xktw=; fh=HbjUFcOqqMlTaLSD67ZuRBy7N5sfJwMFXCm/CGaWEso=; b=iM+daxADLNUdyl+x7R6l68txOkA7NoUGJhIbYgzHs47G+wCGE4ykei3+u2TeeSdguI qTCe5JbEmTerriS/5tn5sW0a2TcRS+34QLq2p6vfHaQwUypKL6MgTzBwwX9kU9/Ov+cA 7VdX0+aNLPgWq7wWJz53uQ5dSeIciWnalDr/+bXtYwRWRVjS4Pj6E2N7zDXZA4FCHuxR Q4cQhfymevu0q5vHthcj0aWPk3sY/CWNre2L2Y7O1cZDm9kMIUCRIhXit9c/XxAoWs3+ i6r5Z49KN6JjXjPAeoHQR4s17PuRhsMveUe9uvl5FBRtkkYaRbexvrfOS5WTlwUydbXA Sd+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=L5y2FL9P; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-55659-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55659-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCXjkGoWlxt0N0osyBQHHq8gKfZG+/hJKJ0PGLFQDdFLwn4ECeUmItXD1b6RyiSpbNQoeG698sMLyzXae4hG2DFe9CyuG22EmfEi8+upng== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t2-20020a17090abc4200b00296a72882c4si1755314pjv.74.2024.02.06.13.55.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 13:55:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55659-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=L5y2FL9P; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-55659-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55659-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 47A5F2839D5 for ; Tue, 6 Feb 2024 21:55:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C63901BC27; Tue, 6 Feb 2024 21:55:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="L5y2FL9P" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22D061B948 for ; Tue, 6 Feb 2024 21:55:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707256546; cv=none; b=WiUxQYbWKVPgDZnkWUBipGGQ1rhov+64OFp7t/RggP7dZoi7ErTQrcibc/qAqNmAwFSp8538CPMebHGVDlwiTTYB9GOD/Yz5EDju3CfJJJt2PbTaHbf7l+VgDF/31IUNeglJbgArZkPcMFA7ODnbDkMGsLb3V9FoZRgbF7nsxh8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707256546; c=relaxed/simple; bh=ScFWhTYt+HvHgJN5dBTn7rmIWKDNAZP3JLX6ELdw0t8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZrwQK71Lpif9Q8rrh2MZ+Nx73e1fbAoRSSYJjwMn76bAM8tUX3njhi4j+dJ6F+Hj//v7FFSSFyxBxfFgslVn6Acy5cy9V0vYUhOpFOYxqyoctvwjj8okBvuB9Cz0ZZJArr4M1AeWDxsbepQgoXSuvWtx7DfsTFVL1Veo5UU5O1I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=L5y2FL9P; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707256545; x=1738792545; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ScFWhTYt+HvHgJN5dBTn7rmIWKDNAZP3JLX6ELdw0t8=; b=L5y2FL9PGEHw1w8HSlK0GtK+7x9mR6hbzKsBfptlyYUQyHwu58U5cVkt h16H2JvOEwxUPEKUs4kv1yMuF/t95umiZzi9Y1m+iTRwY7JBgUmjCF9i2 Sl4t6Rzoiv1B8eV5bdIuZ0fHJkYeIcc9XDHxji8L58r/q08IoD69fk8P0 sy8jzq0d3XajzOJS8FiNo0oOxlTwbSsRQwuK0fvKw4QUpVHLkckNk31LV flJ0ChO0A0xHBBBstzMDh0MAlUKgjZNUSZ8mPx4XdCX1cEoe/u9zhzMJH 9NDHE//HjPuLMsJ7SU4Hdmqv32yLZNfCsQuJZd6izi+8WYHw2YseiNs9r A==; X-IronPort-AV: E=McAfee;i="6600,9927,10976"; a="26297014" X-IronPort-AV: E=Sophos;i="6.05,248,1701158400"; d="scan'208";a="26297014" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 13:55:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,248,1701158400"; d="scan'208";a="1368577" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmviesa008.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 13:55:44 -0800 Date: Tue, 6 Feb 2024 13:57:02 -0800 From: Ricardo Neri To: Valentin Schneider Cc: alexs@kernel.org, Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira , linux-kernel@vger.kernel.org, sshegde@linux.ibm.com Subject: Re: [PATCH v3 1/4] sched/fair: add SD_CLUSTER in comments Message-ID: <20240206215702.GB19695@ranerica-svr.sc.intel.com> References: <20240201115447.522627-1-alexs@kernel.org> <20240206024633.GD17602@ranerica-svr.sc.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) On Tue, Feb 06, 2024 at 02:16:06PM +0100, Valentin Schneider wrote: > On 05/02/24 18:46, Ricardo Neri wrote: > > On Fri, Feb 02, 2024 at 03:27:32PM +0100, Valentin Schneider wrote: > >> > >> Subject nit: the prefix should be sched/topology > >> > >> On 01/02/24 19:54, alexs@kernel.org wrote: > >> > From: Alex Shi > >> > > >> > The description of SD_CLUSTER is missing. Add it. > >> > > >> > Signed-off-by: Alex Shi > >> > To: Ricardo Neri > >> > To: Valentin Schneider > >> > To: Vincent Guittot > >> > To: Juri Lelli > >> > To: Peter Zijlstra > >> > To: Ingo Molnar > >> > --- > >> > kernel/sched/topology.c | 1 + > >> > 1 file changed, 1 insertion(+) > >> > > >> > diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c > >> > index 10d1391e7416..8b45f16a1890 100644 > >> > --- a/kernel/sched/topology.c > >> > +++ b/kernel/sched/topology.c > >> > @@ -1554,6 +1554,7 @@ static struct cpumask ***sched_domains_numa_masks; > >> > * function: > >> > * > >> > * SD_SHARE_CPUCAPACITY - describes SMT topologies > >> > + * SD_CLUSTER - describes CPU Cluster topologies > >> > >> So I know this is the naming we've gone for the "Cluster" naming, but this > >> comment isn't really explaining anything. > >> > >> include/linux/sched/sd_flags.h has a bit more info already: > >> * Domain members share CPU cluster (LLC tags or L2 cache) > > > > I also thought of this, but I didn't want to suggest to repeat in topolog.c > > what is described in sd_flags.h. > > > > Maybe it is better to remove the descriptions of all flags here and instead > > direct the reader to sd_flags.h? > > > > Yeah I agree on less duplication. > > >> > >> I had to go through a bit of git history to remember what the CLUSTER thing > >> was about, how about this: > >> > >> * SD_CLUSTER - describes shared shared caches, cache tags or busses > > > > AFAIK, this describes a subset of CPUs in the package that share a > > resource, likely L2 cache. > > > >> * SD_SHARE_PKG_RESOURCES - describes shared LLC cache > >> > >> And looking at this it would make sense to: > >> rename SD_CLUSTER into SD_SHARE_PKG_RESOURCES > > > > but not all CPUs in the package share the resource > > But SD_CLUSTER never expands beyond the package, right? Correct. > > Regardless, my main point is that having both SD_CLUSTER and > SD_SHARE_PKG_RESOURCES is a source of confusion (at the very least for > myself), Agreed! > and given SD_SHARE_PKG_RESOURCES is really used to mean "shares > LLC" (see update_top_cache_domain()), we could make that flag more explicit > and lift some ambiguity with SD_CLUSTER. As Yicong stated, cluster topology should mean CPUs beyond SMT that share some resource but not LLC. It makes sense to me to keep SD_CLUSTER name as it is today and rename SD_SHARE_PKG_RESOURCES as SD_SHARE_LLC.