From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.6 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 828CCC433DF for ; Wed, 29 Jul 2020 13:09:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E5A720809 for ; Wed, 29 Jul 2020 13:09:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="SuYvuX0I" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726746AbgG2NJQ (ORCPT ); Wed, 29 Jul 2020 09:09:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726353AbgG2NJQ (ORCPT ); Wed, 29 Jul 2020 09:09:16 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9B82C061794 for ; Wed, 29 Jul 2020 06:09:15 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id z18so18031578wrm.12 for ; Wed, 29 Jul 2020 06:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bQfdEuMEXU5Gdcf8kVbSvuqtuSTWo+SqwETHH/EjJfI=; b=SuYvuX0IPCTcXEtfXXG68mvZ/p9xhMQDFcgCiKY5yIg+y5OlPUVAKNNF/hZG3sh3vd ZDdsoF8isKHtF4VEfba4yNQYQMAtk9f+UY5bxgNBI3qfW90yE+oA+GxIM9yphD/FePN8 xFVCMDJEUC8uFud+QApNIx/qBkckMBeFrDLWoRMZEzJ/5WkLD99JdhJq8FzeM6AoedTV fQm8kgKpF7MOOsyRhndcJawlJ2yb0REhjSCq42rQQ3wPZne8LlWoAnoiRALslALMr+Lk qiyOVL9ksB7T9NpJmNAw0dQtJnbBO0j4F3jPIxxSi/ftEUsAsvItJR3LzpOjV55145c+ /5+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bQfdEuMEXU5Gdcf8kVbSvuqtuSTWo+SqwETHH/EjJfI=; b=AAEyYRaLDzfws3XZZPOHpIyzfYCvb8O3wKytRS+WgCJm5cK6Q8Z2+NOyuYMuYUC6n7 shseXOwGWZlmLVOdsJyLEklECGIMWll+l4f9oh04IfbTFn1za5QC4grRLS6te8V8zbif KOeQIcjJf+fEudOk1Uy9Je+WcfP4+xr/Dni3p7U1IqjDWv3tKhxKwep+VwKxCF0SUABQ JoVJg8oPVRxjXO+BcgQblrI/MqUWF4Y0acJQvZMvZUtdx+8uufjQ7uavGbWRHsM6RjEI jBUbAWBwiNqS6vZW21H++ab3BlI/vExhz/8mP+94j2NVps1OFAC1etFtzLQjhMCsTOu6 il6Q== X-Gm-Message-State: AOAM53359nxNwMmRiJXPXxIK+1RSu6GUJmPjrapo0Plfy713cjZF681t jsUg+zBMlXuImprQhwieG9saRA== X-Google-Smtp-Source: ABdhPJxSAMPSjI0FLvCE+74bREfrHAh6dkek8xiGTxb62T9e8tMQouxd50GMLeyj296EW8A60fEAVQ== X-Received: by 2002:a5d:56c9:: with SMTP id m9mr14678893wrw.311.1596028154475; Wed, 29 Jul 2020 06:09:14 -0700 (PDT) Received: from google.com ([2a00:79e0:d:110:f693:9fff:fef4:a7ef]) by smtp.gmail.com with ESMTPSA id v8sm4017619wmb.24.2020.07.29.06.09.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jul 2020 06:09:13 -0700 (PDT) Date: Wed, 29 Jul 2020 14:09:10 +0100 From: Quentin Perret To: Valentin Schneider Cc: Dietmar Eggemann , Qian Cai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, Russell King , Thara Gopinath , Sudeep Holla , Amit Daniel Kachhap , Daniel Lezcano , Viresh Kumar , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot Subject: Re: [PATCH v2 2/3] sched: Cleanup SCHED_THERMAL_PRESSURE kconfig entry Message-ID: <20200729130910.GA1075614@google.com> References: <20200712165917.9168-1-valentin.schneider@arm.com> <20200712165917.9168-3-valentin.schneider@arm.com> <20200727141825.GA4174@lca.pw> <16f8c1d4-778b-3ab8-f328-bae80f3973b4@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Tuesday 28 Jul 2020 at 17:16:57 (+0100), Valentin Schneider wrote: > We could change the arch Kconfig into > > select SCHED_THERMAL_PRESSURE if CPU_FREQ_THERMAL > > but that seems redundant; this dependency is already expressed in > SCHED_THERMAL_PRESSURE's definition. Is there a proper pattern to select > some Kconfig option only if all of its dependencies are met? How about something like this (totally untested): ---8<--- diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 939c4d6bbc2e..2ac74904a3ce 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -46,7 +46,6 @@ config ARM select EDAC_ATOMIC_SCRUB select GENERIC_ALLOCATOR select GENERIC_ARCH_TOPOLOGY if ARM_CPU_TOPOLOGY - select SCHED_THERMAL_PRESSURE if ARM_CPU_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 c403e6f5db86..66dc41fd49f2 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -192,7 +192,6 @@ config ARM64 select PCI_SYSCALL if PCI select POWER_RESET select POWER_SUPPLY - select SCHED_THERMAL_PRESSURE select SPARSE_IRQ select SWIOTLB select SYSCTL_EXCEPTION_TRACE diff --git a/init/Kconfig b/init/Kconfig index 0a97d85568b2..c2e1f3ac527e 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -493,6 +493,7 @@ config HAVE_SCHED_AVG_IRQ config SCHED_THERMAL_PRESSURE bool + default y if ARM64 || ARM_CPU_TOPOLOGY depends on SMP depends on CPU_FREQ_THERMAL help --->8--- Thanks, Quentin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C2BAC433E0 for ; Wed, 29 Jul 2020 13:10:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3BE4920809 for ; Wed, 29 Jul 2020 13:10:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="G8jZRuBV"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="SuYvuX0I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3BE4920809 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wgDoltIwY8BYyTY8tYesGUk+9oVICBsKLVAo8U4GmK8=; b=G8jZRuBV8P79f7hPn++FAgWCg J4WgKNKJ2i2/MF79u/FMemq7pzmUgRDAwK/GHNcJnrs8X5BR2Y8nW5UOa2nbs3A1Vq8xzcfnbB1I7 9r6O0+gKKSyKvOg6l1tmn2w9Er/ezDOaLXdhp7TdxfI8UbIoG6q0KHurhCuGhoPSBpW4G3EeqpUZP CC7bZD9uy2TPIddB6Itdw+yE6MOCKTlNsaNnt3UBB7TfwGbCOd5hVaqJn2KRwy128mzdxxDT6edWI Y+jkRpixHwBEb6d4azvL6YH/HKnZF78MOft6Nb8c6VRxxqSJiuG7BD2j0doR8t1728nM62Rg064R/ w9PrAXBRw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0lpf-00032F-N8; Wed, 29 Jul 2020 13:09:19 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0lpd-00030s-HD for linux-arm-kernel@lists.infradead.org; Wed, 29 Jul 2020 13:09:18 +0000 Received: by mail-wr1-x443.google.com with SMTP id z18so18031576wrm.12 for ; Wed, 29 Jul 2020 06:09:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bQfdEuMEXU5Gdcf8kVbSvuqtuSTWo+SqwETHH/EjJfI=; b=SuYvuX0IPCTcXEtfXXG68mvZ/p9xhMQDFcgCiKY5yIg+y5OlPUVAKNNF/hZG3sh3vd ZDdsoF8isKHtF4VEfba4yNQYQMAtk9f+UY5bxgNBI3qfW90yE+oA+GxIM9yphD/FePN8 xFVCMDJEUC8uFud+QApNIx/qBkckMBeFrDLWoRMZEzJ/5WkLD99JdhJq8FzeM6AoedTV fQm8kgKpF7MOOsyRhndcJawlJ2yb0REhjSCq42rQQ3wPZne8LlWoAnoiRALslALMr+Lk qiyOVL9ksB7T9NpJmNAw0dQtJnbBO0j4F3jPIxxSi/ftEUsAsvItJR3LzpOjV55145c+ /5+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bQfdEuMEXU5Gdcf8kVbSvuqtuSTWo+SqwETHH/EjJfI=; b=QbmS4QiCAyMmUqZXK/siJy/CVCKMwejzxZ5KkwJlFdxI1u2/lSnrzvvo/OQjg9a8mG 5jxMGBv3cj9iEyUFawcDOZl+bg1/h6nJqU6e5YLEdXHofRJYoepBXBn962kXP1LqA3ZP OBwVI0ImeCMuMl/LJpzptz5KBdqFSXg1o4iLLdZ09PuolFykQhknHVE4rpC20RCSI9FV bfkNiY/DYVIUiHROy1a9qCIEIWHpR9a8i4FigJNhfAcGxnKre6d8oLgj1j0ZPOdX7sgF r/aJi9dOIUm6cB+Lm/cJADnEB1zXhYSJFUH0/CK2s5HqnbFSDQU2L+LGpmew+Nd00BrT delQ== X-Gm-Message-State: AOAM530dNpyRcF0Nka3ciM9r/a4j0D+ChcD4nO/mstP2Ed/kP02ejRae 32tCAUPS8AIypk88viE2D04w+g== X-Google-Smtp-Source: ABdhPJxSAMPSjI0FLvCE+74bREfrHAh6dkek8xiGTxb62T9e8tMQouxd50GMLeyj296EW8A60fEAVQ== X-Received: by 2002:a5d:56c9:: with SMTP id m9mr14678893wrw.311.1596028154475; Wed, 29 Jul 2020 06:09:14 -0700 (PDT) Received: from google.com ([2a00:79e0:d:110:f693:9fff:fef4:a7ef]) by smtp.gmail.com with ESMTPSA id v8sm4017619wmb.24.2020.07.29.06.09.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jul 2020 06:09:13 -0700 (PDT) Date: Wed, 29 Jul 2020 14:09:10 +0100 From: Quentin Perret To: Valentin Schneider Subject: Re: [PATCH v2 2/3] sched: Cleanup SCHED_THERMAL_PRESSURE kconfig entry Message-ID: <20200729130910.GA1075614@google.com> References: <20200712165917.9168-1-valentin.schneider@arm.com> <20200712165917.9168-3-valentin.schneider@arm.com> <20200727141825.GA4174@lca.pw> <16f8c1d4-778b-3ab8-f328-bae80f3973b4@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200729_090917_641639_48BABBC2 X-CRM114-Status: GOOD ( 14.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , linux-pm@vger.kernel.org, Peter Zijlstra , Viresh Kumar , Amit Daniel Kachhap , Daniel Lezcano , Russell King , Thara Gopinath , linux-kernel@vger.kernel.org, Qian Cai , Sudeep Holla , Dietmar Eggemann , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tuesday 28 Jul 2020 at 17:16:57 (+0100), Valentin Schneider wrote: > We could change the arch Kconfig into > > select SCHED_THERMAL_PRESSURE if CPU_FREQ_THERMAL > > but that seems redundant; this dependency is already expressed in > SCHED_THERMAL_PRESSURE's definition. Is there a proper pattern to select > some Kconfig option only if all of its dependencies are met? How about something like this (totally untested): ---8<--- diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 939c4d6bbc2e..2ac74904a3ce 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -46,7 +46,6 @@ config ARM select EDAC_ATOMIC_SCRUB select GENERIC_ALLOCATOR select GENERIC_ARCH_TOPOLOGY if ARM_CPU_TOPOLOGY - select SCHED_THERMAL_PRESSURE if ARM_CPU_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 c403e6f5db86..66dc41fd49f2 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -192,7 +192,6 @@ config ARM64 select PCI_SYSCALL if PCI select POWER_RESET select POWER_SUPPLY - select SCHED_THERMAL_PRESSURE select SPARSE_IRQ select SWIOTLB select SYSCTL_EXCEPTION_TRACE diff --git a/init/Kconfig b/init/Kconfig index 0a97d85568b2..c2e1f3ac527e 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -493,6 +493,7 @@ config HAVE_SCHED_AVG_IRQ config SCHED_THERMAL_PRESSURE bool + default y if ARM64 || ARM_CPU_TOPOLOGY depends on SMP depends on CPU_FREQ_THERMAL help --->8--- Thanks, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel