Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp780719ybg; Wed, 3 Jun 2020 13:30:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0xK4vtUw6dNSojOo4EtRsGSMZ6JxjKwVeJrhjZi+PF+CZOE0bQDQ5RT66cM3UCrkXKuI0 X-Received: by 2002:a17:906:a2c5:: with SMTP id by5mr989332ejb.492.1591216258420; Wed, 03 Jun 2020 13:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591216258; cv=none; d=google.com; s=arc-20160816; b=JVyOiy0NxS3a6VdMfVL0I+IOjV33CmLFlT6qKo6WCCpRTEPYKY4xiab7MZSt1BOpQq AWSSDUVNR+lLNDhGC5A+uSEiwW5WJ0cthk4s9Nn6KZUOtx22MUy9hllEPNEpq6SwTWsM ZU+OPnDWNNG7rm7/Axy8qJXwTM+v/vD/GVbIKlUz6INyaHRaTDh9XxjrGalk72fuGALW L7ZAHgNqA8Pb4M7axTuqLPvIfJmoyXmVbODxa6GEm1ORPkmJlWnVFjG9Ux1yBB1FOvcA fboA2EI2uNnKjR9H80Y+9/QuOyOrErxdSflGUvbzSjp4ziQdVXc6UlPgjHa6yHxPVp2h kSaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references; bh=2Rs5ci1kTJQhn3rKqaNlIlGAOW1pz1Lf0V9R8sga+5M=; b=Nj/AIGCagxDzmtOFkdRL1spAsMTZJ/YjLyeXAO9duLAPG23qqXEHZ3kkHbUxzR+1MH hxgYuLm4TXyeBdUtuc+AynRTBKWqfg3X6bIqF5bvFVtUKwNsBRvhRdafjc0mMax2ewWx auXTWlp4/mKVRKny9KGDbdEpxur6r7a8Q0hkeaZfW5G2Q608FGmniMwpY2DKii0Ku6JJ fjnqwFcypw+9KW8YdPnQGDbmqs9TYsxxMk2ZSX4K+RDoFARlzLDs19MJHuds9iCYx/iz LNmU9Sw8dNRSo6PFQq0o6IZlwbJHFOWwlhnXv4cBYpWEVU9LIFC86bOZd7IEiubxF8Ud GzIg== 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 qc28si335745ejb.292.2020.06.03.13.30.34; Wed, 03 Jun 2020 13:30:58 -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 S1726277AbgFCU0H (ORCPT + 99 others); Wed, 3 Jun 2020 16:26:07 -0400 Received: from foss.arm.com ([217.140.110.172]:37624 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725961AbgFCU0G (ORCPT ); Wed, 3 Jun 2020 16: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 303D155D; Wed, 3 Jun 2020 13:26:06 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6ACA53F52E; Wed, 3 Jun 2020 13:26:05 -0700 (PDT) References: <20200603173150.GB1551@shell.armlinux.org.uk> <20200603184500.GC1551@shell.armlinux.org.uk> <20200603195853.GD1551@shell.armlinux.org.uk> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: Russell King - ARM Linux admin Cc: Vincent Guittot , Thara Gopinath , linux-kernel Subject: Re: v5.7: new core kernel option missing help text In-reply-to: <20200603195853.GD1551@shell.armlinux.org.uk> Date: Wed, 03 Jun 2020 21:25:57 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/06/20 20:58, Russell King - ARM Linux admin wrote: > On Wed, Jun 03, 2020 at 09:24:56PM +0200, Vincent Guittot wrote: >> On Wed, 3 Jun 2020 at 20:45, Russell King - ARM Linux admin >> wrote: >> > It's a start. I'm still wondering whether I should answer yes or no >> > for the platforms I'm building for. >> > >> > So far, all I've found is: >> > >> > arch/arm/include/asm/topology.h:#define arch_scale_thermal_pressure topology_get_thermal_pressure >> > >> > which really doesn't tell me anything about this. So I'm still in >> > the dark. >> > >> > I guess topology_get_thermal_pressure is provided by something in >> > drivers/ which will be conditional on some driver or something. >> >> You need cpufreq_cooling device to make it useful and only for SMP >> I don't think that this should not be user configurable because even >> with the description above, it is not easy to choose. >> This should be set by the driver that implement the feature which is >> only cpufreq cooling device for now it > > As I have CONFIG_CPU_FREQ_THERMAL=y in my config, I'm guessing (and it's > only a guess) that I should say y to SCHED_THERMAL_PRESSURE ? > arm and arm64 implement arch_scale_thermal_pressure(); the actual implementation is in the arch_topology "driver" (GENERIC_ARCH_TOPOLOGY). Then, the caller of arch_set_thermal_pressure() is cpufreq_cooling (see below); that'll only get called if you have thermal zones using CPU cooling devices. AFAICT the current state of things imply we should have something like depends on (ARM || ARM64) && GENERIC_ARCH_TOPOLOGY for that option. >> > > + help >> > > + This option allows the scheduler to be aware of CPU thermal throttling >> > > + (i.e. thermal pressure), providing arch_scale_thermal_pressure() is >> > > + implemented. > > Is this feature documented in terms of what it does? Do I assume that > as the thermal trip points start tripping, that has an influence on > the scheduler? Or is it the case that the scheduler is wanting to > know when the cpu frequency changes? > > Grepping for "thermal" in Documentation/scheduler brings up nothing. The former; changing a CPU cooling device's state (IOW changing its max allowed frequency for thermal reasons) leads to a call to arch_set_thermal_pressure() (see cpufreq_cooling.c::cpufreq_set_cur_state()). It's somewhat interesting to have, at least in theory. On plain SMP that would let the scheduler see if some CPUs are more throttled that others, which would be leveraged when doing load balancing. It's more interesting for big.LITTLE & co, where in the worst cases we can have things like capacity inversion, i.e. the bigs are so thermally throttled that they give less oomf than a LITTLE.