Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1116502ybk; Wed, 20 May 2020 22:14:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3oN8sn4Qr8owA+O6Nq8PxDc/29SwkDzId9JISvtvaYxoAsIP2Cqj7O+i75jJtW3j82hvw X-Received: by 2002:a17:906:7c59:: with SMTP id g25mr2097613ejp.393.1590038096447; Wed, 20 May 2020 22:14:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590038096; cv=none; d=google.com; s=arc-20160816; b=FKJKTeVI+6pGVjSwI/Kn9TBS5Go0QhrahV1wpFROqkDGuq508E63DjSLvq3yjjMT1K 0P2sDTOkHsLWZFSQIhxUs0kn8aWa8Y0lfDeh6IxH1XALbJh/OQxB20+BiVUlObmgy/qs 05Cf/ELrDsqvlgM5KKUmwDqwMisvsIdX0hbWP1FnAk3gldVeDW6OtnD+cbu0HlIs/YzB DE8uhA9JseiE/pNZ42RzY568VuCDoUVHqQOriS+6XlAXGcc3xob96w3X+y+x/7RzXLv0 ZtgaaG/9SWYFJz6slUFfNTNfAXyVQY3SJAXWGdDMg0XygBBsDntj3w3xQYVbVWLVUiTm MiYw== 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=AD8unmgm6oauUOHFj/P0iocD1WUvsir6u2NUntElyR0=; b=puuzvVbQkbu3BvBGxY06vaoXvtzoY7wdgSItfpSU7eH8OFEuHxycDT9AYtWiEkWD4G J0ndqXT9hmZPavxKFXxkfcp7s9R/KyZkjcfcvAPkkyp5jyYPuEXh0bey5Sd54DyNs0vj EtJz8D4hmVbgnvukFOEYw2IWOwZ1S4xNr7Ci5Kof8EH41Oqlo2+OXFSyoLECJ8TpARew CSfzn4vjWLkmIu0SF5tykIODJtoMcLq0ZXN33d0RLWdRzSoqUvwDLgK5RSfrgDQv4wXu oV+0dwx9HK2v6caqN2st29/2G4NRg32J9VMYvRAb7iSFZiE7Jc4ue9YvuaCQ4r/+jP52 cPxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verdurent-com.20150623.gappssmtp.com header.s=20150623 header.b=UvUOZ2wn; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t14si468066edy.576.2020.05.20.22.14.24; Wed, 20 May 2020 22:14:56 -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=@verdurent-com.20150623.gappssmtp.com header.s=20150623 header.b=UvUOZ2wn; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726948AbgEUFLw (ORCPT + 99 others); Thu, 21 May 2020 01:11:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726790AbgEUFLv (ORCPT ); Thu, 21 May 2020 01:11:51 -0400 Received: from mail-vs1-xe44.google.com (mail-vs1-xe44.google.com [IPv6:2607:f8b0:4864:20::e44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5524DC061A0F for ; Wed, 20 May 2020 22:11:51 -0700 (PDT) Received: by mail-vs1-xe44.google.com with SMTP id b28so1287405vsa.5 for ; Wed, 20 May 2020 22:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=verdurent-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AD8unmgm6oauUOHFj/P0iocD1WUvsir6u2NUntElyR0=; b=UvUOZ2wnJ60BygQT1sHXXCrN2Tzvau1CgvUsJ7S7Zr6X7l7wgj+zG5uvyALUYk7B1w HQfIDrgd+fRc779lt2xg0fEuyit4c/VliPIE0tqVrmAStjcAHlYwUhfnVSw71bXKFFTg jkVOIgJG4BxuuOzdOJWjxoav6F3ddgx9Q50aog3PRXTt7dLq5VWDL50Ko4KS1o2G3VNq hjFjUIwBP/JiO/+CN0eiAPETP6MkWHYkue378fKFkcKGq/RRG57ajLA8OWKMOID+VzAh 653VA97SNo5MISFjtUdnQsi5tFf2FHisn1O0A2sPHvVD3oJSyOOcB/YLNcQQIxxBILHE iGyQ== 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=AD8unmgm6oauUOHFj/P0iocD1WUvsir6u2NUntElyR0=; b=pKWbJBTUQJVFvXw1JLKb2KUfns9YU3Ps3Ql6cCkCrn4wtnv/z8km3RP4okmHAc7ItM optR2EFR8W3ea9/MzRbx0cAQ9cVea6ooX5XWwRXmyFcGkDLvq+IRkTJmHTLyHaePDnbV tAA/xcK+cuj23vGzXFj85BpEbihS/KcX4pGNXzMJQRGc7PIr+hMsa/N85xip7gixgh8Q VzrEFUUhGbN54Z+3/1TcDKeRmLTMUz1lkIvFRuv9P0qrZEJPkMr5fCoR321pDggGrT1Y OFohZjnfBxEpmMERg9sGb7Ah7QCMOyeKlbSN0AxNOJXcus4TCjLIMg/2lvetk3WhhO8i 9bwA== X-Gm-Message-State: AOAM533yPNlP4KutdMPZ34acU9Z4RsZOShUyYVuEiccZM7VEADShjjvb 2KDXxPZ9CqJdJPH9DsIz5ay4IVkWriuZi6lma6QdekM4 X-Received: by 2002:a67:407:: with SMTP id 7mr5683332vse.95.1590037909533; Wed, 20 May 2020 22:11:49 -0700 (PDT) MIME-Version: 1.0 References: <20200504181616.175477-1-srinivas.pandruvada@linux.intel.com> <20200504181616.175477-4-srinivas.pandruvada@linux.intel.com> <2cd6c73b890b3eab12420adf4ae29101672e6a0b.camel@linux.intel.com> <703fcf3b2b6769f5e469f0b035846ee95193ef7d.camel@linux.intel.com> In-Reply-To: <703fcf3b2b6769f5e469f0b035846ee95193ef7d.camel@linux.intel.com> From: Amit Kucheria Date: Thu, 21 May 2020 10:41:04 +0530 Message-ID: Subject: Re: [RFC][PATCH 3/5] thermal: Add support for setting notification thresholds To: Srinivas Pandruvada Cc: Daniel Lezcano , Zhang Rui , LKML , Linux PM list 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 Hi Srinivas, On Wed, May 20, 2020 at 11:46 PM Srinivas Pandruvada wrote: > > On Wed, 2020-05-20 at 09:58 +0530, Amit Kucheria wrote: > > On Tue, May 19, 2020 at 5:10 AM Srinivas Pandruvada > > wrote: > > > On Mon, 2020-05-18 at 18:37 +0200, Daniel Lezcano wrote: > > > > On 04/05/2020 20:16, Srinivas Pandruvada wrote: > > > > > Add new attributes in thermal syfs when a thermal drivers > > > > > provides > > > > > callbacks for them and CONFIG_THERMAL_USER_EVENT_INTERFACE is > > > > > defined. > > > > > > > > > > These attribute allow user space to stop polling for > > > > > temperature. > > > > > > > > > > These attributes are: > > > > > - temp_thres_low: Specify a notification temperature for a low > > > > > temperature threshold event. > > > > > temp_thres_high: Specify a notification temperature for a high > > > > > temperature threshold event. > > > > > temp_thres_hyst: Specify a change in temperature to send > > > > > notification > > > > > again. > > > > > > > > > > This is implemented by adding additional sysfs attribute group. > > > > > The > > > > > changes in this patch are trivial to add new attributes in > > > > > thermal > > > > > sysfs as done for other attributes. > > > > > > > > Isn't it duplicate with the trip point? > > > A trip point is where an in-kernel governor takes some action. This > > > is > > > not same as a notification temperature. For example at trip point > > > configured by ACPI at 85C, the thermal governor may start > > > aggressive > > > throttling. > > > But a user space can set a notification threshold at 80C and start > > > some > > > active controls like activate some fan to reduce the impact of > > > passive > > > control on performance. > > > > Then what is the use of thermal trip type "ACTIVE" ? > This is an example. > The defaults are set by the OEMs via ACPI. User can't modify that if > they want to optimize for their usage on Linux. There are fan control > daemon's which user use on top. -ENOPARSE. Are you saying users "can" modify these? In any case, how is what you described earlier not possible with an ACTIVE trip point directly wired to the fan as a cooling device or with a HOT trip point that causes the platform driver to send notification to userspace where a fan control daemon can do what it needs to? Basically, I think the issue of polling is orthogonal to the introduction of the new attributes introduced in this patch and I don't understand the reason for these attributes from your commit description. > > > We need a way to distinguish between temperature notification > > > threshold > > > and actual trip point. Changing a trip point means that user wants > > > kernel to throttle at temperature. >