Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1611261imm; Thu, 18 Oct 2018 00:52:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV6010BnyFcSteFe3254lfpjzM5g5LVVzYkUL6svWo9xix/Rkwb6h/2C9p0j8b/RXqnOQTHw2 X-Received: by 2002:a17:902:205:: with SMTP id 5-v6mr29165496plc.307.1539849174236; Thu, 18 Oct 2018 00:52:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539849174; cv=none; d=google.com; s=arc-20160816; b=NOZE2fo94JyvkPYL9MGP0huRxd+4ZHplZAkyniub/ROVSG5u0zBMKfO51463QRxjYR LMNbrNqWm0wtrqBfMEdEEVEllep/xCsKM7YuLwx7klgO7jnqCg9ufWOFmIPhEagQOcU2 CfC5XPiCYCGkjx+SOc9MsIbl9y4S0j3ot+KByU2nFW8jr4OkG5GdARaiiyPNgcLflZxo z2efxFVCn6Nu0is7pPwjhHTvDaMOlBcVAhuP36sXRsfToAeV0+FKNXixUJ+wtOqGVYX4 loo/8jF+hoZw62DkmB9iw/J1ObEgtDrZUEB7JH7HxNZVnXE71ljTsRU3zIy5c3fpkYi8 FFtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tdpOlQlgeOnx0N7HYdMQh9qtWEjQ6MMPQ6nLyhZaHpM=; b=gC+PN08BGQtwvHTDCXmAE0ymAVku07PG3XY96SrnC3t6eGT1y2jTF7EMz/q2ENBFd4 rGVkxmDZZOwzuREqgxUp9c3Ehb9vJppiHkbAiBT53gh+dq/XtVXs5eFz4vLWBjF7KqDB U1p8VAzQyGolDzA2/XdAAg4e0h822j6kOj67qGzVMwHAdBUgB//OMP13avdg38v8bAqG vNDBDj+nsR6p6sFvDdLs+jcs0ao72EMdButU5y1xzfR8D8Mw01TJpgniogL0K1Wug4aU JMPOUUZjqK28NDQr+oGZHX4DJTWFJC0gOJk+9DOnI55VFiBC2cHD0JWkUA/6CoCy678p FQiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ddfIird1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x6-v6si19836329pfd.219.2018.10.18.00.52.38; Thu, 18 Oct 2018 00:52:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ddfIird1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727777AbeJRPuX (ORCPT + 99 others); Thu, 18 Oct 2018 11:50:23 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:36961 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726031AbeJRPuX (ORCPT ); Thu, 18 Oct 2018 11:50:23 -0400 Received: by mail-wm1-f67.google.com with SMTP id 185-v6so4716979wmt.2; Thu, 18 Oct 2018 00:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=tdpOlQlgeOnx0N7HYdMQh9qtWEjQ6MMPQ6nLyhZaHpM=; b=ddfIird1wxXlNPsOuwHtlHDWvP5wmSbiUVQq/XCu7eA0VgPn3XW4V2DJn0ahu/rrLu Z++6WTAz2PPfopuJeqF/+lVEFNx56Qc1LchP/2+BPfrO6OYTyFGzVx7al97Auyy2spA5 aCy36LA85fvD6e0NyxmpalPpgJmp6ZOtcdkzp9MoRBVVSMtrMoBryR8lC0rApMi+NxU9 3kDNZp2SepnhMtX5t3NAaIyeceTSm82I6cHCp72Ld9E1llAKBKQNqvIVLqURp61inwjN 0ikaTNs2hzxzqM4t+6mDNk2S6ESLjnr67J1hcCgd501TTru0mFdHKeP5iaezHdeAA6N7 IKsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=tdpOlQlgeOnx0N7HYdMQh9qtWEjQ6MMPQ6nLyhZaHpM=; b=iHzZS3UfQs3acIvEG/BwZU4n7BhIgCE3pcYJUDmaC8mDGoPRohw5QMhKMQoPFwDsvm G5Dzt+C/zMTY3cyJ7omW6aFIaKEQuzy85dHN7HK2QzsXkmNGNuCK4xEjsobxUTu3J9HQ HAEnTLFYthDlvKnc8pR3dq97Vsqp1gTZ60LXn/iD1hpZDRax4SzXNJO3pdjMpN3VefS1 uNFkmOw/EUdJEQn6y89g5rLhdt9rKm+Ijz0pj7IuKH3yLKIPKuYJ6AYKwAG5FM16+2Fn 6Oh0tG+iO9qVtgot67eD6pofLfs+BEnc+/8HRxYeuko+3Uly8b1ki0DM0b/WtC3h4FUD KMcQ== X-Gm-Message-State: ABuFfogqPQadhqbNDUdwFhKWVvmPYjhk2b2m1TNcJShTfL3uQpUgb/F+ IZV6zl1Jy0ZHGw9KqMbn6pbukIiG X-Received: by 2002:a1c:c683:: with SMTP id w125-v6mr6153589wmf.117.1539849036748; Thu, 18 Oct 2018 00:50:36 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id a84-v6sm4148164wmf.46.2018.10.18.00.50.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Oct 2018 00:50:36 -0700 (PDT) Date: Thu, 18 Oct 2018 09:50:33 +0200 From: Ingo Molnar To: "Rafael J. Wysocki" Cc: Thara Gopinath , Linux Kernel Mailing List , Ingo Molnar , Peter Zijlstra , "Zhang, Rui" , Greg Kroah-Hartman , Amit Kachhap , Viresh Kumar , Javi Merino , Eduardo Valentin , Daniel Lezcano , Linux PM , Quentin Perret , ionela.voinescu@arm.com, Vincent Guittot Subject: Re: [RFC PATCH 0/7] Introduce thermal pressure Message-ID: <20181018075033.GA58819@gmail.com> References: <1539102302-9057-1-git-send-email-thara.gopinath@linaro.org> <20181010061751.GA37224@gmail.com> <5BBE1E1F.3030308@linaro.org> <20181016073305.GA64994@gmail.com> <5BC76181.90105@linaro.org> <20181018064849.GA42813@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Rafael J. Wysocki wrote: > > The only long term maintainable solution is to move all high level > > cpufreq logic and policy handling code into kernel/sched/cpufreq*.c, > > which has been done to a fair degree already in the past ~2 years - but > > it's unclear to me to what extent this is true for thermal throttling > > policy currently: there might be more governor surgery and code > > reshuffling required? > > It doesn't cover thermal management directly ATM. > > The EAS work kind of hopes to make a connection in there by adding a > common energy model to underlie both the performance scaling and > thermal management, but it doesn't change the thermal decision making > part AFAICS. > > So it is fair to say that additional governor surgery and code > reshuffling will be required IMO. BTW., when factoring out high level thermal management code it might make sense to increase the prominence of the cpufreq code within the scheduler and organize it a bit better, by introducing its own kernel/sched/cpufreq/ directory and renaming things the following way: kernel/sched/cpufreq.c => kernel/sched/cpufreq/core.c kernel/sched/cpufreq_schedutil.c => kernel/sched/cpufreq/metrics.c kernel/sched/thermal.c => kernel/sched/cpufreq/thermal.c ... or so? With no change to functionality, this is just a re-organization and expansion/preparation for the bright future. =B-) Thanks, Ingo