Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp272591pxj; Wed, 16 Jun 2021 01:55:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJXC09Cta/0+kXAz/ua3v27Rtzis5Pak+0dvNW2xZ3SEYSb50JbON97R/4wWy3+srnuw/U X-Received: by 2002:a17:906:24db:: with SMTP id f27mr4189443ejb.321.1623833706875; Wed, 16 Jun 2021 01:55:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623833706; cv=none; d=google.com; s=arc-20160816; b=n+gXsxdfDvozPGlNLtmBvVzdt+ItAnqA/w51w3weWcboSUAfZ1yVxLkPj1k/A2yL2W CyDamnET3H5aH+kTSVvDyJQjaFh6xI4apbu9Yd+Vs2rtFY9gK7KRQwc0oYFFjL4SJPzv HKT0Mo7sYnbG97BpGdYgxmLTpNvmqr2Z3NaHtTWCwxJbfbxk/mymT7spHei5nyMRL5+d /ciDu9IN/pN0dPlteOotOwLqXD5kA/2GWELm6zpX4NOBLLcaeGSP9M/nnY0WSboYoaVI 4wchWz+Zj4/ArR78S7dTBhMMS1gASMcx4XudaQNJuxWuLEXDPjJLGaLuRhfdmPMNxbr5 BX7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=DZDMGpM/sEHWM6yNpUmf6M64y/NSXleNdKOJA1uMKLI=; b=wINLbwRxNHRVXHkqjCeRazLnLxgeLxd5wB9KkMmzFcVR5qSJ1+WGyLNnYJI4a2IIe+ paNMd+77W/VUCPTeHoF3BkVsAPaxQ+6joFneYa4J6yLT0Y5x25DiPGSVSdZKxnWL3s8p bCrQRQ/bJmZxICl5CS4+SOHaV34OHq5Y1YFq5yOebwKkpDgd/vA8dsqtw7scDqGD+MO4 2YteFgqcMuQ83oSUjU28qdHKVDbnznvG06ZMXOoPmGdQD1118FRDCk5CnFhi+1h50O82 b9x8uCfcXTV6LEGOUEaqj/5F7gcX2Lk3RwUYJmKkCRh+QJrwZp1A1KVJDPrEc7soJT3x uPFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fGqU8FcH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id de9si1714086ejc.305.2021.06.16.01.54.44; Wed, 16 Jun 2021 01:55:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fGqU8FcH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232140AbhFPIyF (ORCPT + 99 others); Wed, 16 Jun 2021 04:54:05 -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-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