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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 07F8CC49EA2 for ; Wed, 16 Jun 2021 08:52:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E367960FD9 for ; Wed, 16 Jun 2021 08:52:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232169AbhFPIyG (ORCPT ); Wed, 16 Jun 2021 04:54:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231335AbhFPIyF (ORCPT ); Wed, 16 Jun 2021 04:54:05 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F967C061574 for ; Wed, 16 Jun 2021 01:51:58 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id r16so2712246ljk.9 for ; Wed, 16 Jun 2021 01:51:58 -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:content-transfer-encoding; bh=DZDMGpM/sEHWM6yNpUmf6M64y/NSXleNdKOJA1uMKLI=; b=fGqU8FcHMc5nhX9YA09lytW4ocrMvWagjh+D0iOpv5voy1NDMeKfNbo7o49QGG29K4 C8LGuNL7+bKT5WAwiH5ktQ5nsRXtYhiPqtsmyfBwr26gKiTRJRMrWenvtCmWVPanuoJZ 9r8pcULfIWF9pw90Ut3uKKgLfeEWRup6CzMUGyxP1hpKUa+CHvYnU/JdjpzD+kVCagmv exNxfypeksvlZQ2JB+X5uHdEQxUgMck/B6VGyamOFnnw8vZZ7N/NX3EXt11+vLM/Dnz2 u2I9y0sKGcOtnvzSMJ1Gx/5d2HFzQvHwoWQBxavbl4ht2l4W3UggtgeVEedDaMLFNly8 iCrg== 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:content-transfer-encoding; bh=DZDMGpM/sEHWM6yNpUmf6M64y/NSXleNdKOJA1uMKLI=; b=fpE/ImXpg5Kxn/FjL7qRlP61+s7ApZHSIzes7jCfwIW3bJqA9CCic2k1oH0PkBNIxk l7/CiUEKli9n+V7kBdR3VLgp2G3+TdQMWVN33yn/hs0xarhlEdifrM2bfTemiqCMnCIF wW835Nd6eZ+NXbHH4KNam2E+S1oQu6kYS0BVPTQr+Fti/ksTvW6z0+S8EXUJV7vJR0Mw Gu/51Fhk83hqM3Z0wZ0GysLWHExHNFYuaIvZs2jMzY8zwADXVhH845OaYmSuD0DKGmoy u/KnCnRTtxDZiIfLtgouMCxEQLoN7FHhlXFvxWWJ0BhLSvZDXhGrOJfLMoRhvR1l5P4v Hfkw== X-Gm-Message-State: AOAM532W9NOmnq83sJsv28JXFnr9PLXVOzMIfkXUx6ybjqY2fH680rEv DMisT5MPvoLW3JqU+rp1lqpu+KKWsSEemGFiYqGtUQ== X-Google-Smtp-Source: ABdhPJz9EoAtDokg2cYr0siX/A4JmnXVGOJYXURswjVbIR4Ek3x3IVr0+h8/PD8YRFSVZodERoyXmxvK+JU2XOECDbg= X-Received: by 2002:a2e:96d1:: with SMTP id d17mr3534161ljj.221.1623833516943; Wed, 16 Jun 2021 01:51:56 -0700 (PDT) MIME-Version: 1.0 References: <20210529170955.32574-1-digetx@gmail.com> <20210529170955.32574-5-digetx@gmail.com> <6f2b6290-095a-bd39-c160-1616a0ff89b1@linaro.org> <20210615102626.dja3agclwzxv2sj4@vireshk-i7> <595f5e53-b872-bcc6-e886-ed225e26e9fe@gmail.com> <4c7b23c4-cf6a-0942-5250-63515be4a219@gmail.com> <20210616080310.vhvauvo5y6m2sekz@vireshk-i7> <96bf59af-20b6-b706-5ff0-fe70f9eba827@gmail.com> In-Reply-To: <96bf59af-20b6-b706-5ff0-fe70f9eba827@gmail.com> From: Vincent Guittot Date: Wed, 16 Jun 2021 10:51:45 +0200 Message-ID: Subject: Re: [PATCH v3 4/7] thermal/drivers/tegra: Add driver for Tegra30 thermal sensor To: Dmitry Osipenko Cc: Viresh Kumar , Daniel Lezcano , Thara Gopinath , Thierry Reding , Jonathan Hunter , Zhang Rui , Amit Kucheria , Andreas Westman Dorcsak , Maxim Schwalm , Svyatoslav Ryhel , Ihor Didenko , Ion Agorria , Matt Merhar , Peter Geis , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-kernel , linux-tegra@vger.kernel.org, "open list:THERMAL" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 16 Jun 2021 at 10:39, Dmitry Osipenko wrote: > > 16.06.2021 11:30, Vincent Guittot =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > On Wed, 16 Jun 2021 at 10:03, Viresh Kumar wr= ote: > >> > >> +Vincent. > >> > >> On 15-06-21, 22:32, Dmitry Osipenko wrote: > >>> IIUC, the cpufreq already should be prepared for the case where firmw= are > >>> may override frequency. Viresh, could you please clarify what are the > >>> possible implications of the frequency overriding? > >> > >> The only implication is software would think hardware is running at > >> some other frequency, while it is not. Not sure if something may break > >> as a result of this. > >> > >> The scheduler's view of CPUs will not be same though, i.e. scheduler > >> will see capacity as X, while in reality it has changed to Y. > > > > thermal_pressure is used by scheduler to balance the load between CPUs > > according to the actual max frequency. If the thermal pressure doesn't > > reflect reality, scheduler will end up enqueuing too many tasks on a > > throttle CPU. > > What if all CPUs are throttled equally and running on the same > frequency, will throttling have any effect on the scheduler decisions? Yes, the capacity is also used to detect when CPUs have spare capacity or are already overloaded. We usually try to fill the spare capacity of a CPU (CPU's max capacity - current utilization) but he max capacity is reduced when the CPU is throttled, and the spare capacity doesn't exist but scheduler could try to it