Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp700790imm; Wed, 10 Oct 2018 02:57:01 -0700 (PDT) X-Google-Smtp-Source: ACcGV611OmuTWXSQwTCGJT386oSbtTWcUHooFCrkN/VaBnRhp6qqd9vkiNj1Q/Q3HHEfj94CLc5O X-Received: by 2002:a63:d208:: with SMTP id a8-v6mr27070757pgg.99.1539165421447; Wed, 10 Oct 2018 02:57:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539165421; cv=none; d=google.com; s=arc-20160816; b=G41xxNdaZcFGwlkhgBXsAXK3l5hmbVuUZX6ThW7CQ0U1yonoFp+p1OMMBeya5NmUkp vBWX3R9p+l3JjTvTWR6d3L5NZ9enEsiHDegQzUzOoeyE9G8U3GplzbrYLoO0eMq26etF srTNCrlaDW06R24pIKR8oQBS+3u4Zf2FbW2FjpfiEK0fDfgso7fqHxLDO4Y46o0N2cAf 4M+ihXonuR2dzHwZZ7bRkBw2qjUufROj11S9bIT0Nyz0gNN/cdkVEx34UZW8DqEmaMlp qtCIas0scAX30ycTYNduOpJPgtA0pJtk8y0DfwmaS7cob3urm3oLmmaBB2VHIzvaCDXW zF2g== 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; bh=PJagOx/0X/NcVOylfz1MC8KOCqkUSEG9lKwnjIbOY2U=; b=Cxch2X7P5AaWXpqglgnjwGzLl2l/fexkurXSD2cWcas02Ybc+GSm4TEVLMgsOmKpd2 rnvAjJKlQ646sz97NdyDjzwqL2htEM/DGH0C6367Qv7B7lJpWoXIsxtLJX7usEM1PiFf 3MTskdorG/P5f2/LrKziAeVTho3NsOvt6okfmrHxi086yKvxNTjqTEkWyWMRjcS68oBv xhv/fh2VVpSoaLcGbjvSChWbCaLU0mxwH7nXvwea6i+96wqcUD+BENP1kPHdhtXsJIWO de8/ZMKGT2abvKenpCYwpuDYq0WAx4g/HYPfiQ++VY6hXpp4T458h0tpuR3ohyYMFWaw QOEw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 207-v6si23876037pgb.298.2018.10.10.02.56.46; Wed, 10 Oct 2018 02:57:01 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727056AbeJJRQa (ORCPT + 99 others); Wed, 10 Oct 2018 13:16:30 -0400 Received: from foss.arm.com ([217.140.101.70]:49592 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726515AbeJJRQ3 (ORCPT ); Wed, 10 Oct 2018 13:16:29 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2424380D; Wed, 10 Oct 2018 02:55:06 -0700 (PDT) Received: from queper01-lin (queper01-lin.cambridge.arm.com [10.1.195.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6FC173F5BC; Wed, 10 Oct 2018 02:55:03 -0700 (PDT) Date: Wed, 10 Oct 2018 10:55:01 +0100 From: Quentin Perret To: Vincent Guittot Cc: Ingo Molnar , Thara Gopinath , linux-kernel , Ingo Molnar , Peter Zijlstra , Zhang Rui , "gregkh@linuxfoundation.org" , "Rafael J. Wysocki" , Amit Kachhap , viresh kumar , Javi Merino , Eduardo Valentin , Daniel Lezcano , "open list:THERMAL" , Ionela Voinescu Subject: Re: [RFC PATCH 0/7] Introduce thermal pressure Message-ID: <20181010095459.orw2gse75klpwosx@queper01-lin> References: <1539102302-9057-1-git-send-email-thara.gopinath@linaro.org> <20181010061751.GA37224@gmail.com> <20181010082933.4ful4dzk7rkijcwu@queper01-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vincent, On Wednesday 10 Oct 2018 at 10:50:05 (+0200), Vincent Guittot wrote: > The problem with reflecting directly the capping is that it happens > far more often than the pace at which cpu_capacity_orig is updated in > the scheduler. Hmm, how can you be so sure ? That most likely depends on the workload, the platform and the thermal governor. Some platforms heat up slowly, some quickly. The pace at which the thermal governor will change things should depend on that I assume. > This means that at the moment when scheduler uses the > value, it might not be correct anymore. And OTOH, when you remove a cap for example, it will take time before the scheduler can see the newly available capacity if you need to wait for the signal to decay. So you are using a wrong information too in that scenario. > Then, this value are also used > when building the sched_domain and setting max_cpu_capacity which > would also implies the rebuilt the sched_domain topology ... Wait what ? I thought the thermal cap was reflected in capacity_of, not capacity_orig_of ... You need to rebuild the sched_domain in case of thermal pressure ? Hmm, let me have a closer look at the patches, I must have missed something ... > The pace of changing the capping is to fast to reflect that in the > whole scheduler topology That's probably true in some cases, but it'd be cool to have numbers to back up that statement, I think. Now, if you do need to rebuild the sched domain topology every time you update the thermal pressure, I think the PELT HL is _way_ too short for that ... You can't rebuild the whole thing every 32ms or so. Or am I misunderstanding something ? > > Thara, have you tried to experiment with a simpler implementation as > > suggested by Ingo ? > > > > Also, assuming that we do want to average things, do we actually want to > > tie the thermal ramp-up time to the PELT half life ? That provides > > nice maths properties wrt the other signals, but it's not obvious to me > > that this thermal 'constant' should be the same on all platforms. Or > > maybe it should ? > > The main interest of using PELT signal is that thermal pressure will > evolve at the same pace as other signals used in the scheduler. Right, I think this is a nice property too (assuming that we actually want to average things out). > With > thermal pressure, we have the exact same problem as with RT tasks. The > thermal will cap the max frequency which will cap the utilization of > the tasks running on the CPU Well, the nature of the signal is slightly different IMO. Yes it's capacity, but you're no actually measuring time spent on the CPU. All other PELT signals are based on time, this thermal thing isn't, so it is kinda different in a way. And I'm still wondering if it could be helpful to be able to have a different HL for that thermal signal. That would 'break' the nice maths properties we have, yes, but is it a problem or is it actually helpful to cope with the thermal characteristics of different platforms ? Thanks, Quentin