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 034ABC48BE6 for ; Wed, 16 Jun 2021 08:52:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E06E86109D for ; Wed, 16 Jun 2021 08:51:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231336AbhFPIyE (ORCPT ); Wed, 16 Jun 2021 04:54:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231335AbhFPIyE (ORCPT ); Wed, 16 Jun 2021 04:54:04 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A8C0C061767 for ; Wed, 16 Jun 2021 01:51:58 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id 131so2756293ljj.3 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=ZU0T6PihnvTih6vftirEk4AeaJW1uV4kmr7oAQQKiuhMgPHxE+rUAuOWb8Rtwq8a+y 3u34wA6oy+ppJtaMo3VHGOpuZ5x178NhoOus6GxBxj9eo6tpV9oTyRmOuF08fOxTHLHc GDXNJKmtE5u4j6sd1iSG2a5Nl4o2082k7xebqB9jX1qO4/tSHzmr25CU3rKztZ+c3iEx QSTqOYz+WUfGcm+Bonn+AraMbT76boSHJsP0TNjDm8CXOFhGlfts80yuNRkm03qrGdPy MT6RYvPBq9ud8fYJeF0Tps/CRFdeknXFi9IQ0YzuFbAjtx1Y6ZL61cIS5f6cHWTwJst7 Wfjw== X-Gm-Message-State: AOAM532BbmLtgPb1nmeWQIgAzQFm3jkKchBm6sT0ZE0hbtT0txtu2S9Z wHJDQpSDvnMK65lVHaj059n2yT/1Z6a/M0D9yR+QmA== 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-tegra@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