Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp651073rdf; Fri, 3 Nov 2023 10:44:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+vb7509jeOP6HO8hglFsUZ+tTPrNOUVsPDmdQs9SC+P5SeIZFTPttFae5ntHM5M+d7cIb X-Received: by 2002:a17:902:c146:b0:1c6:3157:29f3 with SMTP id 6-20020a170902c14600b001c6315729f3mr19007507plj.36.1699033462652; Fri, 03 Nov 2023 10:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699033462; cv=none; d=google.com; s=arc-20160816; b=l16CZucmSDMPCROapc/kzH+Z2rIWGJgUNlNqExfAOHno7KDOXZQF/LUazeOxSoLKY0 6ONSMBUJ5W26JAcPdgDSssWQfqXxKEVUcDlJhm+IteglZn3iOvaMdOIHeYjFIu5j+Pzf eUZeVt59JHHpVxsQFg7nqYHRc+5L4/cYF/lchRrX1mH25baPR27JTgzpa9cQBLOGe6cK c9HFaIrMxfidYJRuXWJPKz8GfCt5X1CUI/ZNAo8fA31/Nh+cndazyMms2G+ohAG7zVnB 6yQQV8WRWtQQmvs24ooqY5w624Vd1PH1UiNwk8dqBZNeks5b+fdboMRj0Q5jE9DU7Qxz Ggqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=aIvZEKHaJxoPCdC0kbJg+1YILsDyr+aIf900fUUKC04=; fh=D9mkDN6B6PaYqd0Bg+MeVGLh+nAhIO5mh9oVW5NBP8A=; b=HQgddunw+wrEusqQ9ehYu2lVoKx5yoAn0hx4LlXqAf3Jr2DFzJvndSpEsh9yuZDOpz E4sJdTyLMhmwMrk9ldPlfAHVyPVk8u16jZo/JRYPJL2Xb9UTX5s4kjMFND/fYc49w0OK Jf5oYPfD5MKE3s6pFCeN5jGcVMl/U0HsAml8AcmB1MEsuOxEsCZO7WkQ2+LdNs87+ovB VNTIFvBHeCNHGL65vRgSx02HfBuKorL/6KF7jvflyZiwxtDfzxF7zXwBPl1pbPEYZuY5 CFBby4FMhB7C3lbywO1FHnA2FRx9bVqbNHJe0qdmYW7zbJXxT0XTqoFYKK4l+UOHAUwW NshQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ltUOQcOy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id b17-20020a170902d51100b001cc54202425si2020029plg.409.2023.11.03.10.44.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 10:44:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ltUOQcOy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 90B7B809B6F6; Fri, 3 Nov 2023 10:44:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230141AbjKCRnn (ORCPT + 99 others); Fri, 3 Nov 2023 13:43:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjKCRnm (ORCPT ); Fri, 3 Nov 2023 13:43:42 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADB8C136; Fri, 3 Nov 2023 10:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699033416; x=1730569416; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=aIvZEKHaJxoPCdC0kbJg+1YILsDyr+aIf900fUUKC04=; b=ltUOQcOyy/4ylDF0Xrra6yton99Wor6Pf90fpH0B0N561+RyAviTA2HA 2u/ebxf49Ccd0CbhUD1TFt4pxvwzsCr6jLnW9nwj9VD2QoNbBAouiEIE/ 1KgiixuPsWYHMUSLRc1VTqgUzFmLQYKR2sloJBQCjkp0UrZxRoOuovJq8 NQ+2NJSVgXMQtBJMx63xHBZhOzb9wZA83KoptFJaF7tF0PlHDTnzTi0FY dUkGCosGLOLJCJ2f/qlauD/YHoQ0s17wuiCh1TXlg5ySdEHxj47lLBQuu LU4krZ+ucEx8etCTURvO5NN0Pbu74FOs+rKsJ+OZ7B2PbE1kXVq0omfcb g==; X-IronPort-AV: E=McAfee;i="6600,9927,10883"; a="387880936" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="387880936" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2023 10:43:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10883"; a="738139242" X-IronPort-AV: E=Sophos;i="6.03,273,1694761200"; d="scan'208";a="738139242" Received: from tinggan-mobl.amr.corp.intel.com (HELO [10.213.173.96]) ([10.213.173.96]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2023 10:43:35 -0700 Message-ID: <1cf3bf9cb37ddcf0022f680c3f7f4442c6218c10.camel@linux.intel.com> Subject: Re: [PATCH v2] thermal: core: Add trip thresholds for trip crossing detection From: srinivas pandruvada To: Daniel Lezcano , "Rafael J. Wysocki" , Linux PM Cc: LKML , "Rafael J. Wysocki" , Zhang Rui , Lukasz Luba Date: Fri, 03 Nov 2023 13:43:33 -0400 In-Reply-To: <3fe787bc-f85c-4268-833f-86922415c4d3@linaro.org> References: <12317335.O9o76ZdvQC@kreacher> <6b22f4715641bc4ffc76eea8a4e6358bcbea9e1c.camel@linux.intel.com> <3fe787bc-f85c-4268-833f-86922415c4d3@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 fry.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 (fry.vger.email [0.0.0.0]); Fri, 03 Nov 2023 10:44:15 -0700 (PDT) On Fri, 2023-11-03 at 17:30 +0100, Daniel Lezcano wrote: > 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 > > >=20 > > > 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).=C2=A0 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. > >=20 > > In other words you want to avoid multiple trip UP notifications > > without > > a corresponding DOWN notification. > >=20 > > This will reduce unnecessary noise to user space. Is this the > > intention? >=20 > Not only reduce noise but give a correct information. Otherwise the=20 > userspace will have to figure out if there are duplicate events after > the first event happened. The same happen (less often) when crossing > the=20 > trip point the way down. Correct. The patch looks good to me. Thanks, Srinivas >=20 >=20 >=20