Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp763888ybk; Wed, 20 May 2020 11:20:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvNNPTeeI2lEnfDbzb6MfQBmFgKbKQB/AB7xub/9RGGfPGVpWtTShwB4kwsBHr2UUdFV3e X-Received: by 2002:a17:906:7d90:: with SMTP id v16mr303351ejo.554.1589998841601; Wed, 20 May 2020 11:20:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589998841; cv=none; d=google.com; s=arc-20160816; b=EBuwW5MTI4seEEEK8rbOEbT2eOrqFZUhZY+p91ID9JX6FJrbsveWfJL/w9D9nrwGbo soukY97RSPokl/NxfYHlmSh/ziNgL8rf0CRMICV0nMt1iyqvn2jrwDOEqK1hd0EoaUec MDe8b4SVccu+zK/Wstu1DZG+EOoRqnWlMVsR3YL3GnXQYedUEqZuxfQ4N00cOiQn4iy2 GewYfSYLBuAa4ORJcIQsWQ2ZJDhxI9vUENzqIC2QExtEsE2nYMANGRvBqCqyPnszCrXx mf7e1y2u6rBXSW9kpb/LoqG+nAn0zdXjLwGclU9w75NBH2BukJwX1kIxm7xXkmvGo7rF SDPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:ironport-sdr:ironport-sdr; bh=xdLHviOFjc1XYNSSie9k+0A1wLXKT+hJ6JwrHNsLSj0=; b=Dj06FX2DSeJZVqDPXfX6nr3AxiYbukqqs/sHlVzPlBQLRhvDOKNiw6wHmtOlIQ0gwi 4q9JYzytkjFj4AvosRU6f8u0Yfsql6stEEanJ1KbBWiEGZtq11gH3v1Qzw1wFKAA9xkB oLxq5x4IljTbleS6YCHv5ZBTKdnDXLd/5JStA0MKsim83iP3eeimhgddjtmnUQx6ZLHz jdKFaNGK+37riEfbtZQ9mC8ygReJU89dF6KtX0BvCWsZsLX2u1nBgx8FjkiWPw+whO1V ROBxY8uFP7aKJ9KXkzv+Yoby6ySsBHphMnBNbGfDX6vHS4FPmerMZ0s8pc2kkqknFHFv TqeA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w25si1782529edl.165.2020.05.20.11.20.18; Wed, 20 May 2020 11:20:41 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726548AbgETSQs (ORCPT + 99 others); Wed, 20 May 2020 14:16:48 -0400 Received: from mga03.intel.com ([134.134.136.65]:36517 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726566AbgETSQs (ORCPT ); Wed, 20 May 2020 14:16:48 -0400 IronPort-SDR: gDbAchNiwHK19UtAx+ApftL1LK5Fa5N+C4OVh0AcQsBO0TCUKLYxXBIvIgtVNzkBlyePI6nvY2 SlcW/bVSxEjA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2020 11:16:47 -0700 IronPort-SDR: ofFGhnpg3DUpJ9SIJyXv07e73SpxgvDhO9X0Jdqak6vhbQpUWzgUpbNM2bo0n61b22CsFbtdhQ Km+XHytHFrXg== X-IronPort-AV: E=Sophos;i="5.73,414,1583222400"; d="scan'208";a="440129382" Received: from spandruv-mobl.amr.corp.intel.com ([10.255.228.34]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2020 11:16:47 -0700 Message-ID: <703fcf3b2b6769f5e469f0b035846ee95193ef7d.camel@linux.intel.com> Subject: Re: [RFC][PATCH 3/5] thermal: Add support for setting notification thresholds From: Srinivas Pandruvada To: Amit Kucheria Cc: Daniel Lezcano , Zhang Rui , LKML , Linux PM list Date: Wed, 20 May 2020 11:16:46 -0700 In-Reply-To: References: <20200504181616.175477-1-srinivas.pandruvada@linux.intel.com> <20200504181616.175477-4-srinivas.pandruvada@linux.intel.com> <2cd6c73b890b3eab12420adf4ae29101672e6a0b.camel@linux.intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, Srinivas > > > 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.