Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1903200ybg; Fri, 5 Jun 2020 00:07:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycpCUd2KrowNR3ePY/jUvB2w9hFw94OWnmyz2uUsewSUZoJl07m1EdO2EAPJLv9/rF5vps X-Received: by 2002:a17:906:b845:: with SMTP id ga5mr7330996ejb.300.1591340857379; Fri, 05 Jun 2020 00:07:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591340857; cv=none; d=google.com; s=arc-20160816; b=j93Z3yJHDOGUUYuJJvyWRD1oLEju7XGB7yzepNNJniJgSbaGIeEvpUt/ZeeSoOG3iM s5rJZT7HoW42QAQDr3Nq4H1AY7McIgsrqxqpmFqaMCx4IbgPkLqQoB5I1QyLWaUrtmi6 g45H1OML18e/PyjRER0bexlywRa20TzkM27uHlAVIBfirNHC40aWww3ihXfG//4NWPQ8 vmLokWOd5wka6jxUtgg1Trgg3FR0LJ7p+KFGmH8U6K/8cJJPtNtLmUY5dg3q9+CNC0Nb vtTsMOyFdwU++ggFVd0m+84uoDEcXeku8Rp8+bz+U9As1DEV7fNsF4nECmw+ujlnwmQu APCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Co2UPjoUty+9+lwyKbI6wKV9XsBItgK3tIfpuC7GLdQ=; b=KW6Te0HfZfG7kcqr51ENzViiPl64SPS3rooTpPk6EFQOwEgKqcZutKBU3WP8PYNKPF WAp39WFVDa4Qsm1q1FIGnwStqI1+vpl5ddL0DERWgij+O0Z9erCYFnnig3nD2PuyYqxq qiqwyx57jFragBaW5j3NduEOGCTJ4fuZqszzov475Gg/aW2AMOboK/OmwBp3zl1Jn3wF h8p5+dNNTVHwmytSThpdudurJdW9qjiNqgcBCbDZgEpQsLwOH+KQzhB3BLyggx5x4p03 QICxnYWG4J30BnH/F6jt93MS9c9PC0sr47oDYAVobfUqOKprNpwTbVG7fe9j1aDTljEp n0rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mXA08T4P; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr10si3912443ejc.204.2020.06.05.00.07.15; Fri, 05 Jun 2020 00:07:37 -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; dkim=pass header.i=@linaro.org header.s=google header.b=mXA08T4P; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726159AbgFEHDZ (ORCPT + 99 others); Fri, 5 Jun 2020 03:03:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726096AbgFEHDZ (ORCPT ); Fri, 5 Jun 2020 03:03:25 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8658C08C5C2 for ; Fri, 5 Jun 2020 00:03:24 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id c21so5142457lfb.3 for ; Fri, 05 Jun 2020 00:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Co2UPjoUty+9+lwyKbI6wKV9XsBItgK3tIfpuC7GLdQ=; b=mXA08T4Px/zQB81VkGn7HG3AhkR0XrmT0ss3HPMv3jkDTiRW7baCX/YM6rMDJSWlHT 9N+0VB5TY8Nn0V8M+rZrudJ0yCrH9GcGXuTdU8CI6u8wMEsuPPqvGpKuOmeAkcZwjnsJ mmCIfL1WQHmXoj/PHZN4kx3xjkJmy5aPWMKsEw1tJQoQuzz+hv/dUvclwhMP9pcadwkl ur3ivdDP0aycE+rGIvJ7GdAtjbr35TeMqIslQS9gtSMOKffdMwmFCbvcW4LbXs0ilegO bHRoGdf79XMlynOVHxBrLEChR30F+k0sGThgEUWJJHkUrQhZg+FRJuYKDr787dhyeuCC d2oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Co2UPjoUty+9+lwyKbI6wKV9XsBItgK3tIfpuC7GLdQ=; b=HGcbjYB9ySKLi2OnrDhyeLxnC6IJS4p3X/t1v1LHAZNRIWN6zEAFkHFnxuBz2/KVcT PokodDhZ2IFacQizGXlqhqOWP6rSyqJoC5OmRMbO8usQRK33KD0pfJW6ZatZMBJoHyvU bmv/xYtMdcDFgIPkfjbOsp57AMJKkdJ4p5EA6Dpo+8lPAbUuoaedZY1YFWu7r/G6QJ/b GBmYQw/Cdg+Tz4F3gwL0Htc8OOuaiCDsD1m9xa0WzRiLZfioPGrjLY+DZqpkn9yckwA6 +1MIBL2xjGUTPcs3/TjGExwA7u49r8Sd/8THToIxuynjz4eMbAOkYofK8V9qwSnqudaP ZTsQ== X-Gm-Message-State: AOAM53047fhcl6y9kPGLeSbXIb2sO8GaA3UPGMBuLV0BnHIvdht+Z0h/ RBdudRjLcZX+tG+eX20q6MKaUs5kjMocd0On2+rFWQ== X-Received: by 2002:a19:2250:: with SMTP id i77mr4607252lfi.133.1591340603159; Fri, 05 Jun 2020 00:03:23 -0700 (PDT) MIME-Version: 1.0 References: <20200603173150.GB1551@shell.armlinux.org.uk> <20200603184500.GC1551@shell.armlinux.org.uk> <20200603195853.GD1551@shell.armlinux.org.uk> <20200604092901.GE1551@shell.armlinux.org.uk> In-Reply-To: From: Vincent Guittot Date: Fri, 5 Jun 2020 09:03:11 +0200 Message-ID: Subject: Re: v5.7: new core kernel option missing help text To: Valentin Schneider Cc: Thara Gopinath , Russell King - ARM Linux admin , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Jun 2020 at 17:38, Valentin Schneider wrote: > > > On 04/06/20 14:05, Thara Gopinath wrote: > > On Thu, 4 Jun 2020 at 06:56, Valentin Schneider > >> > >> Right, s/defconfig/arch kconfig/ or somesuch. > >> > > > > CPU_FREQ_THERMAL also has to be enabled for this to be effective. > > Since arm64 defconfig enables CPU_FREQ_THERMAL (by enabling CPU_THERMAL), > > it should be ok to enable it in arm64/Kconfig. (same with arm/Kconfig) > > > > Another option is to select the SCHED_THERMAL_PRESSURE when > > CPU_FREQ_THERMAL > > is enabled in drivers/thermal/Kconfig. > > > > So interestingly while arch_set_thermal_pressure() (which just writes to a > pcpu variable) is defined in sched/core.c, arch_scale_thermal_pressure() > (which just returns aforementionned pcpu variable) is defined in > arch_topology... > > I'm thinking at this point we might as well turn the > arch_scale_thermal_pressure() stub into what arch_topology does. This would > effectively let any architecture use thermal pressure, providing they use > cpufreq cooling. > > If we want to keep changes contained to Kconfigs, for now I think the > safest would be: > > --- > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index 16fbf74030fe..1e92080dc275 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -46,6 +46,7 @@ config ARM > select EDAC_ATOMIC_SCRUB > select GENERIC_ALLOCATOR > select GENERIC_ARCH_TOPOLOGY if ARM_CPU_TOPOLOGY > + select SCHED_THERMAL_PRESSURE if GENERIC_ARCH_TOPOLOGY I think that SCHED_THERMAL_PRESSURE depends on ARM_CPU_TOPOLOGY but not on GENERIC_ARCH_TOPOLOGY. ARM_CPU_TOPOLOGY is used to define arch_scale_thermal_pressure for arm architecture and we only use the header file of the generic arch_topology.h. Function like arch_set_thermal_pressure() is in sched/core.c > select GENERIC_ATOMIC64 if CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI > select GENERIC_CLOCKEVENTS_BROADCAST if SMP > select GENERIC_CPU_AUTOPROBE > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 552d36cacc05..cc1944fbae51 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -98,6 +98,7 @@ config ARM64 > select FRAME_POINTER > select GENERIC_ALLOCATOR > select GENERIC_ARCH_TOPOLOGY > + select SCHED_THERMAL_PRESSURE > select GENERIC_CLOCKEVENTS > select GENERIC_CLOCKEVENTS_BROADCAST > select GENERIC_CPU_AUTOPROBE > diff --git a/init/Kconfig b/init/Kconfig > index 74a5ac65644f..ba846f6e805b 100644 > --- a/init/Kconfig > +++ b/init/Kconfig > @@ -439,8 +439,11 @@ config HAVE_SCHED_AVG_IRQ > depends on SMP > > config SCHED_THERMAL_PRESSURE > - bool "Enable periodic averaging of thermal pressure" > + def_bool n > depends on SMP > + depends on CPU_FREQ_THERMAL > + help > + > > config BSD_PROCESS_ACCT > bool "BSD Process Accounting" > --- > > > > > Warm Regards > > Thara