Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp935812imm; Wed, 10 Oct 2018 06:41:17 -0700 (PDT) X-Google-Smtp-Source: ACcGV61zoDRVMhfkwku7gRQVetOJkmTPv++NtQv/8btqkBarUIVHFeUFCfkYsWXNtLLdjIy874Rs X-Received: by 2002:a65:41c6:: with SMTP id b6-v6mr30477900pgq.421.1539178877935; Wed, 10 Oct 2018 06:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539178877; cv=none; d=google.com; s=arc-20160816; b=mJ1J1Etx7eZY3qTEIMJbZJFP1HJVYcnXgqCW0wKAB7YGbWTHZpLt/ScpYXoyDaUq3c ARZTuLTn9l9me4ao6fu7csEsTHnR4QsMuOo6dCTZb7EXvIDQwk9021HPglg80ZqK8VTH WEPXJX58ZmEI3CAzP4IDv99+K4Ct4V2VuIYXW4bOGGYlJlWUE4EmSRWXMH+cs1T+4TCL BchBbsiNwAnWFfiBmY+G3AJBZvBBkgBYWjgtr14OLCOOFPjfcbcmf9d7PALx2WLPiUf8 LYeATyHNq/3O+B83DMtt9BaqP0h2w9GuIuyrIgSy5WMjjQ2ZgGxanMYpD/Zes7OqugaJ AGpQ== 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=6YQ8CO3YMjzfA2gYVu5dxFhovXelNBSF33wEAhFkAhQ=; b=e8iAsKReiU8/HnZt8FtRuC77MVPh8jvK2/f1hP/t/vMY+CliNS12hffpIRooTsCCyI 2CwBUNFf+o576/lP+gaH2Daq0LwQqdoX/yxpTaep+BCKlGu/8poi1UoJzPDNzdBgUIlT UCfejTQpvMHc1oPOyT1dnReO36dhQYGm4o/YiFD9svFl/vitKgD0WCbPWyoORAQwYrNJ cpPWuRQmh5wK+iPnbD+jhc68M8h6AsWlSmEeaiCbKY7qSyUZaKroLSscN8XK9GKmf3Tl 4A4HqMCzGwKHi/U6SL7/bmAL3U4Fy8Q5Q7XzvKg/ByBXoH1R3Zq1es9JL1AtHaqGHcF3 PL9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gXmVcyqu; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 8-v6si22999058pgv.137.2018.10.10.06.41.02; Wed, 10 Oct 2018 06:41:17 -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=pass header.i=@linaro.org header.s=google header.b=gXmVcyqu; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727094AbeJJVBY (ORCPT + 99 others); Wed, 10 Oct 2018 17:01:24 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:54085 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726636AbeJJVBX (ORCPT ); Wed, 10 Oct 2018 17:01:23 -0400 Received: by mail-it1-f196.google.com with SMTP id q70-v6so8037130itb.3 for ; Wed, 10 Oct 2018 06:39:09 -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=6YQ8CO3YMjzfA2gYVu5dxFhovXelNBSF33wEAhFkAhQ=; b=gXmVcyqulKb9JQ+qP0oVvCAJWDUhONvUaTed/mUVSwibUOE9VY6VFR9EWEjRSI8YGl PTJ1KAN52NFK+D8Gak2Vhwm0vqVf8rs//cmdk7h6ajw4tp8sbhsdbBTtgDK1oEpNPfPv zAUypsOyMryVP/Ihc7H3bqM+Gx/GbtqMLPF+U= 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=6YQ8CO3YMjzfA2gYVu5dxFhovXelNBSF33wEAhFkAhQ=; b=mnbxhOmmJ9LupYzq91NcCor2eN4Cz7xPPWe6bB0W7DaBLtGLQ9lhGrJxojNmnwpN7N OSPO+ARSSpIpPfLJe4OvoZzu4VKooXcO+wPxmnMkSIsmli0bbiRU8RD1CZNgrAaozOQE JWd5z2cyvgeQDod6qg2bVbDcLFgL79hghpEIVQGXz+eHCfJivBueLHGYwV/uTe5V5A+I Oshsn7Zp/c4M4YVevGT/53D9JO9c40I3l9zTq5fka/U5dBqdJOgTb0PZT7sXR/OqJv8h VQbv6avoIBU132CYD1MF5D+srUPKDlClKBPNopUa5FAB51m1B/f6wlKV0KuZ6mKevLvw n16w== X-Gm-Message-State: ABuFfojAfiTX6mOa4QBYTjA8rJwVoehU9RfYClIcBowiw+FV84V4fFKU V7CftqYsetgAFB7Q4kBKxBtClgbXudAwR9UFlg3dNQ== X-Received: by 2002:a02:844c:: with SMTP id l12-v6mr26897876jah.137.1539178749213; Wed, 10 Oct 2018 06:39:09 -0700 (PDT) MIME-Version: 1.0 References: <20181010082933.4ful4dzk7rkijcwu@queper01-lin> <20181010095459.orw2gse75klpwosx@queper01-lin> <20181010103623.ttjexasymdpi66lu@queper01-lin> <20181010122348.GL9130@localhost.localdomain> <20181010125033.GP9130@localhost.localdomain> <20181010133443.GR9130@localhost.localdomain> In-Reply-To: <20181010133443.GR9130@localhost.localdomain> From: Vincent Guittot Date: Wed, 10 Oct 2018 15:38:57 +0200 Message-ID: Subject: Re: [RFC PATCH 0/7] Introduce thermal pressure To: Juri Lelli Cc: Quentin Perret , 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 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 Wed, 10 Oct 2018 at 15:35, Juri Lelli wrote: > > On 10/10/18 15:08, Vincent Guittot wrote: > > On Wed, 10 Oct 2018 at 14:50, Juri Lelli wrote: > > > > > > On 10/10/18 14:34, Vincent Guittot wrote: > > > > Hi Juri, > > > > > > > > On Wed, 10 Oct 2018 at 14:23, Juri Lelli wrote: > > > > > > > > > > On 10/10/18 14:04, Vincent Guittot wrote: > > > > > > > > > > [...] > > > > > > > > > > > The problem was the same with RT, the cfs utilization was lower than > > > > > > reality because RT steals soem cycle to CFS > > > > > > So schedutil was selecting a lower frequency when cfs was running > > > > > > whereas the CPU was fully used. > > > > > > The same can happen with thermal: > > > > > > cap the max freq because of thermal > > > > > > the utilization with decrease. > > > > > > remove the cap > > > > > > the utilization is still low and you will select a low OPP because you > > > > > > don't take into account cycle stolen by thermal like with RT > > > > > > > > > > What if we scale frequency component considering the capped temporary > > > > > max? > > > > > > > > Do you mean using a kind of scale_thermal_capacity in accumulate_sum > > > > when computing utilization ? > > > > > > Yeah, something like that I guess. So that we account for temporary > > > "fake" 1024.. > > > > But the utilization will not be invariant anymore across the system > > Mmm, I guess I might be wrong, but I was thinking we should be able to > deal with this similarly to what we do with cpus with different max > capacities. So, another factor? Because then, how do we handle other > ways in which max freq can be restricted (e.g. from userspace as Javi > was also mentioning)? IMHO, userspace capping is a different story because it is not expected to happen so often but it should stay for a while and in this case, a solution is probably to rebuild the sched_domain and update all the cpu_capacity struct and fields