Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp121406pxj; Thu, 3 Jun 2021 02:26:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysOHB8bZ5J44v/dUcblZmE2YdIuGh9fVOwoIsW+so9h0wb8I4uS+qFTBHnc9xLnY+dAqf2 X-Received: by 2002:a17:906:55d6:: with SMTP id z22mr38510676ejp.355.1622712360627; Thu, 03 Jun 2021 02:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622712360; cv=none; d=google.com; s=arc-20160816; b=EFgK799JnYK9bj/qVt0TFnADmAgqTG7hDR/RZNk+D8rBClGPDHwYM/YqVZFRQ2FqtV 1PNdtlERAlqVdoKtC1ZZeWLFESbwc3aPyMuO8WMndmPeLm0aQ+vXYrSVsa6WTX+uAkiS 3kBERCMipAeiWhlxdRxNXtq6UHBFqMcCbmJO3jrwAPpvvBsrR7qo73xOp+CaAvyqXKSh hSjrCxmYfpfYSKgZqsgbkH1gtJhfimKojLSKe5GxseblK9H8l/zyFnDLxDOAF2HHckh1 VqfNx6HI5I5AOe4iSZFB5Np1tv/H0yUDG8gJg2ZlcTjFD98cXFf0qQTyDdlbrKAnGEhl TGxQ== 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=ZdYaNQfVGFZItxR3V0ZO5qoe7xKIXDVriz83me11MZQ=; b=zmC/DKB/D/pksRlEbx2PZfSXQ8Zojo9HGZIJoroxaYgL7XIkg7+ZHdwI9ElvfG9RBG d3m0FBGyWhsfmrGlBApWuJEZQl0Zjg1tbAOVFx33FVWz7zb+pIcDAUGFeRbNTJ/Prycu y1Vf8QdnaOjQFkkk3p2rtsSPDftE68S+YSPfMxdwypcjDhru7H7uV+ttY7sSi1pp94ds Bt87f7dli5c3xAHHO7s8bE3GTUjJSYdEcoDUdVAPD3EdTso02lyDpJZasOdW9EP6Sg9D VKXYBnYBRqLegai7aUG1tHqc9xwZv0Eq/e0s/jv6Bx2++QIOi2b6DnbJ5XlZD0bOsGHB nFPg== 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=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si1997771edv.112.2021.06.03.02.25.38; Thu, 03 Jun 2021 02:26:00 -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=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229620AbhFCJ0H (ORCPT + 99 others); Thu, 3 Jun 2021 05:26:07 -0400 Received: from foss.arm.com ([217.140.110.172]:36356 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbhFCJ0G (ORCPT ); Thu, 3 Jun 2021 05:26:06 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 31D5611FB; Thu, 3 Jun 2021 02:24:22 -0700 (PDT) Received: from e120325.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0CB7A3F774; Thu, 3 Jun 2021 02:24:19 -0700 (PDT) Date: Thu, 3 Jun 2021 10:24:11 +0100 From: Beata Michalska To: Dietmar Eggemann Cc: Valentin Schneider , linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, corbet@lwn.net, rdunlap@infradead.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v5 2/3] sched/topology: Rework CPU capacity asymmetry detection Message-ID: <20210603092411.GA4181@e120325.cambridge.arm.com> References: <98ad8837-b9b8-ff50-5a91-8d5951ee757c@arm.com> <20210526121546.GA13262@e120325.cambridge.arm.com> <20210526125133.GB13262@e120325.cambridge.arm.com> <20210526214004.GA1712@e120325.cambridge.arm.com> <14593ba7-eed9-f035-724c-5cadbb859adc@arm.com> <20210527170729.GA20994@e120325.cambridge.arm.com> <4f43a9a8-b64e-bb47-b3c1-f51165f40249@arm.com> <20210602194805.GA18136@e120325.cambridge.arm.com> <32ffee58-5ea9-1e01-c134-9fb90d1b1771@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32ffee58-5ea9-1e01-c134-9fb90d1b1771@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 03, 2021 at 11:09:48AM +0200, Dietmar Eggemann wrote: > On 02/06/2021 21:48, Beata Michalska wrote: > > On Wed, Jun 02, 2021 at 07:17:12PM +0200, Dietmar Eggemann wrote: > >> On 27/05/2021 19:07, Beata Michalska wrote: > >>> On Thu, May 27, 2021 at 05:08:42PM +0200, Dietmar Eggemann wrote: > >>>> On 26/05/2021 23:40, Beata Michalska wrote: > >>>>> On Wed, May 26, 2021 at 08:17:41PM +0200, Dietmar Eggemann wrote: > >>>>>> On 26/05/2021 14:51, Beata Michalska wrote: > >>>>>>> On Wed, May 26, 2021 at 01:15:46PM +0100, Beata Michalska wrote: > >>>>>>>> On Wed, May 26, 2021 at 11:52:25AM +0200, Dietmar Eggemann wrote: > >>>>>>>>> On 25/05/2021 12:29, Beata Michalska wrote: > >>>>>>>>>> On Tue, May 25, 2021 at 10:53:07AM +0100, Valentin Schneider wrote: > >>>>>>>>>>> On 24/05/21 23:55, Beata Michalska wrote: > >>>>>>>>>>>> On Mon, May 24, 2021 at 07:01:04PM +0100, Valentin Schneider wrote: > >>>>>>>>>>>>> On 24/05/21 11:16, Beata Michalska wrote: > > [...] > > > So what I have done is : > > > > diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c > > index 77e6f79235ad..ec4ae225687e 100644 > > --- a/kernel/sched/topology.c > > +++ b/kernel/sched/topology.c > > @@ -1324,6 +1324,7 @@ asym_cpu_capacity_classify(struct sched_domain *sd, > > if (!asym_cap_miss) > > sd_asym_flags |= SD_ASYM_CPUCAPACITY_FULL; > > > > + WARN_ONCE(cpu_smt_flags() & sd->flags, "Detected CPU capacity asymmetry on SMT level"); > > leave: > > return sd_asym_flags; > > } > > > > Comment can be adjusted. > > This would sit in the classify function to nicely wrap asymmetry bits in one > > place. What do you think ? > > ... and you would need to pass in the sched domain pointer ;-) Yes, as that was for current version. > > Still prefer to check it in sd_init() since there is where we set the flags. > > But you can't do 'cpu_smt_flags() & sd->flags'. MC level would hit too, > since it has SD_SHARE_PKG_RESOURCES as well. Yeah, I would need to check: cpu_smt_flags() & sd->flags == cpu_smt_flags() and if I am to move it to sd_init then additionally checking for SD_ASYM_CPUCAPACITY ... and #ifdef for SMT ..... so I guess I will go with your proposal using the SD_SHARE_CPUCAPACITY directly. Will update in the v7. --- BR B.