Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1397771ybg; Thu, 4 Jun 2020 08:41:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxszo7E6MtW21MsO+zDDXuohzErs9v/NBqHMFMxM28+/ceVTtUrJDwqAe5rVmgJuLe1c7qE X-Received: by 2002:a50:e1c9:: with SMTP id m9mr4677947edl.196.1591285308722; Thu, 04 Jun 2020 08:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591285308; cv=none; d=google.com; s=arc-20160816; b=QR3UnRoaTIYp9ygMRsRvDpL5kdY8IWtnF5IVVMiBSmdbOuIfsidrEV7wWLRKqv9AVL 3i0wCNp0USt5Trhf6+zW1vtolbbfzRBEk/r678lzVQn89uvFhEHaLRKPXP8JlAGvZeuL WdfvLmYmobGftMfJaRcBrj23zZgsxpCka9v/NKeNNUf7NLlJF/MKz/+GGLLbWU1/xNUG AJzQ7NXCaI3Y9jqMPi6uCV7HQkZ/TxWzeaLQAZo39jwZUNVEYQ7NfKixkhHB0l+gMOxW hpASoysUxI0tNqTpK7rwrovFFrmxbmbgwezRG5PcXPv2fPK0zv6/TAapu2BjondQWmIW eSXA== 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=iRb8Q2hn3otLRf/PI3b4D1S1aEluYJnRci28Fvvxq4k=; b=dE4HbiiJX8QJbTfLhrUMrSJuYvwBg91Hw25Drb+U9JQTWd6X8mCCXFTWb4e5HuKQg9 jJl5Hrj7Be6IA79rXlbdhQg49mknsruOV0x3BiWZjkT+zSNsi7hZ+7AE4DbdlHdg8Bvy rKwfDiqLPwhrH1o6kYAuUA/Hnggp5vtLtZlWLWTvn/UWafJXJDNXkjioFFC+dTWAMkxX FEVGT6WBMd2h27DL+NmOvNtjbaidynZEuzyb+eGNJtvI0cgU9v34miz05y1/F0ZrI+j5 c8gpCobVF7NjKpkRKdbVRWn77V9jQAjITn9fSYFew3XbUHVwd6XWrMwWeM3+5t9jc4yU z3bw== 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 b5si1871623edu.182.2020.06.04.08.41.26; Thu, 04 Jun 2020 08:41:48 -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 S1729370AbgFDPir (ORCPT + 99 others); Thu, 4 Jun 2020 11:38:47 -0400 Received: from foss.arm.com ([217.140.110.172]:46030 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729035AbgFDPir (ORCPT ); Thu, 4 Jun 2020 11:38:47 -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 7230D1FB; Thu, 4 Jun 2020 08:38:46 -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 AED9A3F305; Thu, 4 Jun 2020 08:38:45 -0700 (PDT) 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> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: Thara Gopinath Cc: Russell King - ARM Linux admin , Vincent Guittot , linux-kernel Subject: Re: v5.7: new core kernel option missing help text In-reply-to: Date: Thu, 04 Jun 2020 16:38:40 +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 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 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