Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp605778rdf; Fri, 3 Nov 2023 09:31:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFM/sU9EgKvA0+xAelrxivEfopgjxDDVD05Mn4q+WZ4ahiaqiqrTpuc8Lh7jNYt9uXM/qqY X-Received: by 2002:a05:6870:1094:b0:1f0:15f4:41df with SMTP id 20-20020a056870109400b001f015f441dfmr9889688oaq.37.1699029085897; Fri, 03 Nov 2023 09:31:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699029085; cv=none; d=google.com; s=arc-20160816; b=eTilMXxeH1rDK5VVrg4nXkCMJBkcBh7HNCGx42pKqQSsUsU8Q/w9d99wdXaEBhxZgQ jNa9CQR5o129trsbvH2MoyCt5yxs+NJzd3La1K4PqT2sXwpnUb2uCy092Cak1B0Oxrs0 vVZprFAwm8J3Xf5EfYnZt5r6kuO7TaTcQQrlYqa3CR77hM1/Vq9WR0J2kM+rDDpJWY2P 4K5KxRzwXs3d1GFn94XJVMy4mU6I8eYXRnWLHlnY1+2PDvfV/8uMJF0Jn2Ot9oSmO1gE sjMbzggbuJR4WKFN3eaiAmCc/aR6syTY5ROaFAHT/l9RYCIXEcZ021OgcEo7s5ZezQ01 6I7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=gIkzMbx9D/76gKi93VnRryrPgyBjD5wxQisCsbr7Cg8=; fh=nHOpxz/ntsoClxO/WA+aDlvtIFbYLUYUAjGDDeMSpDM=; b=mguKpGlKIIIFYwuXF8yH6aDfI3/523bJz9zBqxfTRpQn38sB2RQZqSX5KZ1WTo75D2 N9h9Z60O3lL9Ybakd1Nnta2tMkuHWSBkid94gBkOK1fAWF0EwW8a4e4wLwn0jeUAbLr1 fN3RkgVpK26chZQqXD8bWg2rZOnXtpCr9XyzAHDpPUtOE1KxhhGbUn/HPs8iGY+xJq+7 KIFiCMnbFVckKM9f7lkeoF6eI+78TVpDSQfat40i0gXo5RRIjLeKypiMCxpHuWtzV7mq P4WL0D+h+qSTBkhuYzufl2nQefbd6rybj3hvbtXwhqNYbNfKZdhTVRW8rH11KN87T32v kxaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ortm+lvK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id oq6-20020a0568707d8600b001dd606c83fdsi794769oab.50.2023.11.03.09.31.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 09:31:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ortm+lvK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 5C206820EA69; Fri, 3 Nov 2023 09:31:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230121AbjKCQag (ORCPT + 99 others); Fri, 3 Nov 2023 12:30:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbjKCQaf (ORCPT ); Fri, 3 Nov 2023 12:30:35 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C760D191 for ; Fri, 3 Nov 2023 09:30:29 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40853c639abso16993045e9.0 for ; Fri, 03 Nov 2023 09:30:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699029028; x=1699633828; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=gIkzMbx9D/76gKi93VnRryrPgyBjD5wxQisCsbr7Cg8=; b=Ortm+lvKn+zEQR8KE8FnEhPGcp2+sFQr377n4QRhMt8q8y3lJMxuoB0E/R8D0wcDZW CkOH1frrJGmwUVFK4w/QGmXvf+TWTdKg95y6GC7g1+f/z2aE85zMzur38lm1Q4haEeO2 gKtmWnrYmD5nmCVMZyZATJu1zT3ibnkKq3pAHNtIX0VGKZoZiDTffTHHzXDmTfK8qsfw hgnm+vF1DLPKsfER5s2ajmZ+4RTktnLVb5UrpwtMIG3ljGdYjSJ1ujbo0a9U/+f5lKYc 27x9IDy+Cbe+YhvTXhgLBhD3HUMKPGaNTblx/IqWvHS2/q5qmdpAiB2CUl39zAGsFEIA PH9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699029028; x=1699633828; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gIkzMbx9D/76gKi93VnRryrPgyBjD5wxQisCsbr7Cg8=; b=KAfdl1r6CVffXTg6hagS6xst6LhXnVVYwwzEGkiTpZNls6DalcO+MBUb0fS4huZr8V F7Rx8BWFwnU0raon5mJBqEXlWyT6M4vSLYuKc7X03KmaVXpb5I+cI6rC10EtCMfQy5wx jI03WBCgPJOriDvbEj/AnjNmOJqO7fs04lo24VDu9iW/cjoCSwtjxaCHANc3AG9v7veD nH9ZEmBY2F8MfZZDpxxrnlfvg7zoDd5PqE4xX5wthz13y/vkK1S4BNblbhuqwSbyZfbM +Lnv5/EaXNtE5HPzbOAjM1BJkjI3RXW4LyWmvGEMnRbqBjwtAk721mJIHxxEopdj8zU0 87QA== X-Gm-Message-State: AOJu0Yx+uAHvkWN3RU9Cs7DzSgQ5SK82OLnr2dmlOrj3RXRSHOwGfqdt KhUQ6ZCbvvhjqdSDI5IuohAI0A== X-Received: by 2002:a05:600c:4897:b0:401:38dc:8916 with SMTP id j23-20020a05600c489700b0040138dc8916mr17906557wmp.10.1699029028073; Fri, 03 Nov 2023 09:30:28 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:7a26:df60:2875:9dfb? ([2a05:6e02:1041:c10:7a26:df60:2875:9dfb]) by smtp.googlemail.com with ESMTPSA id bh5-20020a05600c3d0500b004094e565e71sm3121394wmb.23.2023.11.03.09.30.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Nov 2023 09:30:27 -0700 (PDT) Message-ID: <3fe787bc-f85c-4268-833f-86922415c4d3@linaro.org> Date: Fri, 3 Nov 2023 17:30:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] thermal: core: Add trip thresholds for trip crossing detection Content-Language: en-US To: srinivas pandruvada , "Rafael J. Wysocki" , Linux PM Cc: LKML , "Rafael J. Wysocki" , Zhang Rui , Lukasz Luba References: <12317335.O9o76ZdvQC@kreacher> <6b22f4715641bc4ffc76eea8a4e6358bcbea9e1c.camel@linux.intel.com> From: Daniel Lezcano In-Reply-To: <6b22f4715641bc4ffc76eea8a4e6358bcbea9e1c.camel@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 03 Nov 2023 09:31:12 -0700 (PDT) On 03/11/2023 16:42, srinivas pandruvada wrote: > On Fri, 2023-11-03 at 15:56 +0100, Rafael J. Wysocki wrote: >> From: Rafael J. Wysocki >> >> The trip crossing detection in handle_thermal_trip() does not work >> correctly in the cases when a trip point is crossed on the way up and >> then the zone temperature stays above its low temperature (that is, >> its >> temperature decreased by its hysteresis).  The trip temperature may >> be passed by the zone temperature subsequently in that case, even >> multiple times, but that does not count as the trip crossing as long >> as >> the zone temperature does not fall below the trip's low temperature >> or, >> in other words, until the trip is crossed on the way down. > > In other words you want to avoid multiple trip UP notifications without > a corresponding DOWN notification. > > This will reduce unnecessary noise to user space. Is this the > intention? Not only reduce noise but give a correct information. Otherwise the userspace will have to figure out if there are duplicate events after the first event happened. The same happen (less often) when crossing the trip point the way down. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog