Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3647100pxf; Mon, 15 Mar 2021 14:55:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziXeb2/u6s3OLkZk1qCBOEUfOwJhENct3bjB7sq6/fDRW+qKndBa+i6oC+mkHokf1gjK/7 X-Received: by 2002:a17:907:75c7:: with SMTP id jl7mr26984473ejc.191.1615845347617; Mon, 15 Mar 2021 14:55:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615845347; cv=none; d=google.com; s=arc-20160816; b=Zcxtfv+ds/cL/GqVdt2sA+pE2As8VtI1EPPzgH3Lgvub9iOiHWE00tkcwKbuWuHThf Tjf0RmQA4TmQcrtiu2VUwAlZnImOQM8cfv/F/74EiUWl9twXnZK1vXOtvN8aO1vDfLtc lbWN5eU2EjXuo77bqBe1uE1ISmdB49aU3fEeJSorulH7569LpvYVsqDxZvQfxzVtSPUx LV5RO7ebzOiJqV0MSFdBevC8nBdF/5XY+RZKRHSmkzFVn6sjmmpVW6Wq0MZxbeYM22SH /xWoSxtJY18G41tT14rwz17xY4ZNmWy1H04mX6CiJEb9vxwyqLb/ar0hxUGO1TtsnCv1 SEJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=XxqbEs4IQIrys1kEKfRDoY9/R98qlclGd0b6IH+jP00=; b=gS+hQxJcM/ckSaCm5THBc55dQI2WZYfHgsrXnfaRuTT/59nK0u1TyVLFhFAonvv037 KmC3t+zr4YXlw2bttQgx8onPTuNZREvMzsYgUkaunbxlNzAQiRIuMwtDhy1gTOQZpr6S UguTG+tWMjwofQ5nUOJJGusgoX2UAtDlCyOZoQ6qe7LB9AXM5ocCM1poB5S/DpSUY3tP D4XsQgNMBkOR87RRimo0vxnXZYuPfVVEhBCJxiewASEmwBvLwwJC/PEfTXrxNo3YHNGp W9FGgN8z7pFwxco1VEjyotYAfaj3NOoSNsSF2cNCJ+yqKUamnxfSC8TRGwV0/ZI9Va1/ cTDg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v24si12080872eja.84.2021.03.15.14.55.25; Mon, 15 Mar 2021 14:55:47 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231857AbhCOUxw (ORCPT + 99 others); Mon, 15 Mar 2021 16:53:52 -0400 Received: from mga12.intel.com ([192.55.52.136]:46786 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231406AbhCOUxo (ORCPT ); Mon, 15 Mar 2021 16:53:44 -0400 IronPort-SDR: MoRRlM8tYjnSTFFbDhoBMJwsB3gsN5dbScw50vfZj5J+E94sVY9wrxv9FDpsrwyDVuZ4coF5DP ED15NoX5BLCw== X-IronPort-AV: E=McAfee;i="6000,8403,9924"; a="168427514" X-IronPort-AV: E=Sophos;i="5.81,251,1610438400"; d="scan'208";a="168427514" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2021 13:53:43 -0700 IronPort-SDR: UmN7Xty5kJHpaJ/Bav3R7JijAPjfMYPsyCYhxow/JKYG8+zblTey/huYZLzx4L1gC4fkgjcUk2 SyHS+3/tSMFQ== X-IronPort-AV: E=Sophos;i="5.81,251,1610438400"; d="scan'208";a="411972696" Received: from schen9-mobl.amr.corp.intel.com ([10.252.129.167]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2021 13:53:43 -0700 Subject: Re: [Linuxarm] Re: [RFC PATCH v4 3/3] scheduler: Add cluster scheduler level for x86 To: "Song Bao Hua (Barry Song)" , Peter Zijlstra Cc: "catalin.marinas@arm.com" , "will@kernel.org" , "rjw@rjwysocki.net" , "vincent.guittot@linaro.org" , "bp@alien8.de" , "tglx@linutronix.de" , "mingo@redhat.com" , "lenb@kernel.org" , "dietmar.eggemann@arm.com" , "rostedt@goodmis.org" , "bsegall@google.com" , "mgorman@suse.de" , "msys.mizuma@gmail.com" , "valentin.schneider@arm.com" , "gregkh@linuxfoundation.org" , Jonathan Cameron , "juri.lelli@redhat.com" , "mark.rutland@arm.com" , "sudeep.holla@arm.com" , "aubrey.li@linux.intel.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "x86@kernel.org" , "xuwei (O)" , "Zengtao (B)" , "guodong.xu@linaro.org" , yangyicong , "Liguozhu (Kenneth)" , "linuxarm@openeuler.org" , "hpa@zytor.com" References: <20210301225940.16728-1-song.bao.hua@hisilicon.com> <20210301225940.16728-4-song.bao.hua@hisilicon.com> <6d8940e227324c2c88474d9d0769c001@hisilicon.com> From: Tim Chen Message-ID: Date: Mon, 15 Mar 2021 13:53:38 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <6d8940e227324c2c88474d9d0769c001@hisilicon.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > It seems sensible the more CPU we get in the cluster, the more > we need the kernel to be aware of its existence. > > Tim, it is possible for you to bring up the cpu_cluster_mask and > cluster_sibling for x86 so that the topology can be represented > in sysfs and be used by scheduler? It seems your patch lacks this > part. You mean having something in /sys/devices/system/cpu/cpu0/topology on cluster information so that an external program can affinitize to a cluster if it prefers to do so? Tim > > BTW, I wonder if x86 can do some improvement on your KMP_AFFINITY > by leveraging the cluster topology level. > https://software.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-reference/top/optimization-and-programming-guide/openmp-support/openmp-library-support/thread-affinity-interface-linux-and-windows.html > > KMP_AFFINITY has thread affinity modes like compact and scatter, > it seems this "compact" and "scatter" can also use the cluster > information as you see we are also struggling with the "compact" > and "scatter" issues here in this patchset :-) > > Thanks > Barry >