Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3320366ybc; Thu, 21 Nov 2019 06:42:07 -0800 (PST) X-Google-Smtp-Source: APXvYqyONhAZ2GqNAxjWIi08ksdLoDCmOE2laY8h0vW/oFMX039UOUpXJGzBoh4SCmWB11scqktQ X-Received: by 2002:a17:906:7251:: with SMTP id n17mr14554282ejk.329.1574347326905; Thu, 21 Nov 2019 06:42:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574347326; cv=none; d=google.com; s=arc-20160816; b=BPAQ9dDKqmFdNsx7La7+Y6ydts/Di8cn4mcZkngAx+KobXwy8GX3cglC+CodUDkohZ gDaus1qsGbnkxTCBFpmPgKCFc1hL/FMovwllvQd53ULckVsR9V+cBujemVtN2qUVbqIx u+tb44RPBBLXjzmNmJ368YQ5ZmJyZI9GNfI6BeecyV10QmtkLCNKztafO3mea+VRLeDk RcVdwNuA33QWFf43pHx7Y/8tuQSvtLT5GAXzN5LHngNgklGskmSm3+FcWzZdo3/pap0M iUyeKwGHnC0cDswgMsbTTaN88fTPogLJJh2rrR/fF3dWtYCGJhMxni7Mio7isMMGU/WB nANw== 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=6uBnaV53sfik9uxAcuVDwoQxz4HOkeWfiqm0sSdBIt8=; b=HuPZfeWuXF3q/WrvH5iUnkGP3GwHXNLvMHTOqYAMEzNKTDsjmiTzc+4xZ69Lb76032 bGjt3gENMcnJw3yos4BKmwA+PPEetacb/QRNwLv6OnU8JBZxCwUP0mzjFL3qW+olK6MO UVEslw0K0fUg46Zxh+5xSJNrYw4iHJafBiJHBMWGXDzp5/nqFdcIajAGhJSzXYz59xn4 eo9aH3LCAAZy/WiwjPR8jbLAdE9hFc6zL3HhDz6NvmcqYSxuepe7In9Yx6tAJQw5ZkYB wi7BUDPLPhzdHYDTbDHON4il/DlEtdWVPWRVEST/M6N66oHmGW2ZLBZ0GYpR+zEQ+khH b65A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qHqYx5I4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id gx24si2033892ejb.429.2019.11.21.06.41.42; Thu, 21 Nov 2019 06:42:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qHqYx5I4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726983AbfKUOig (ORCPT + 99 others); Thu, 21 Nov 2019 09:38:36 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:39823 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726690AbfKUOif (ORCPT ); Thu, 21 Nov 2019 09:38:35 -0500 Received: by mail-qk1-f196.google.com with SMTP id o17so3218124qko.6 for ; Thu, 21 Nov 2019 06:38:31 -0800 (PST) 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; bh=6uBnaV53sfik9uxAcuVDwoQxz4HOkeWfiqm0sSdBIt8=; b=qHqYx5I4KcHedAmjd1d5VA7Cra9+uql2Yg67DF2JfSdPqsJ9EBrZsdLeui/10SaKzH lrrFFHp0N+fIKs1O5Kq/ZoBYYg9bm60jFhTHSBSqZ/pz0a4O0hlJpEaSpXZT/a4rCBba r+b7qbul7RWhqR5/gvoKpK10Z9wOYvo2Znmq1eO73y/pTQ3Jw4cmkXMi7fwGTAqv0w+Q dwBt78bp5McJFh6GlndtSeqBFnLD4teFPcw8DJUGYUHzCbeVj4wq/9zaKDYbajO3NSKz G1rS+kNrXqfzQnLlMxpsau6iJW7BUFPZ2L4DWv80kqaGYmPNiPllMKTBqmyIrbNU0aHE WE7w== 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=6uBnaV53sfik9uxAcuVDwoQxz4HOkeWfiqm0sSdBIt8=; b=KeZuZYBclSJBwdxJIJfePVsvnLfGetBvTYHJCAs7nkvHUdCj2JysnxcKplx+xK71hv A0HglkhmuCslUifZt2dt7VBsqGFUtDBkn1PRDKzyNb7UqI9l+WIuze/FkNmXspMZE68y LfQl20wDy+wBD8ish3CdNuHAT0ypkYK6qXMrUwfFrBNVHXnM+N+zChQYqcxaaA7rEEE8 JKWSP9cCNV93e5T+Lfu/leiUoGfXT/xeZ0XVhDpFdcKzoi9hCXFNm+M09BEXXQP4Dih1 tMpGn3qo4pPuXUPaqvWK4yupvym/rrWh5INXmnEy8d9bBbtXPVbjtAfTes0p1GJFr2ao r1Yw== X-Gm-Message-State: APjAAAWQ0iy2WlC584rw6dyQzDpaL6LznLXxCbJrehJIrS3H8bXxje2z hcuczo1fli0vD3+PacmNsbmriKZoNEPOCFimkaioSuxoReI= X-Received: by 2002:a05:620a:12f3:: with SMTP id f19mr7967709qkl.106.1574347111146; Thu, 21 Nov 2019 06:38:31 -0800 (PST) MIME-Version: 1.0 References: <8e812065f4a76325097c5f9c17f3386736d8c1d4.1574315190.git.amit.kucheria@linaro.org> <5DD69AB7.3060307@linaro.org> In-Reply-To: <5DD69AB7.3060307@linaro.org> From: Amit Kucheria Date: Thu, 21 Nov 2019 20:08:20 +0530 Message-ID: Subject: Re: [PATCH] drivers: thermal: step_wise: add support for hysteresis To: Thara Gopinath Cc: Linux Kernel Mailing List , linux-arm-msm , Bjorn Andersson , Stephen Boyd , "J, KEERTHY" , Zhang Rui , Eduardo Valentin , Daniel Lezcano , Amit Kucheria , Ram Chandrasekar , Lina Iyer , 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 On Thu, Nov 21, 2019 at 7:40 PM Thara Gopinath wrote: > > On 11/21/2019 12:50 AM, Amit Kucheria wrote: > > From: Ram Chandrasekar > > > > Currently, step wise governor increases the mitigation when the > > temperature goes above a threshold and decreases the mitigation when the > > temperature goes below the threshold. If there is a case where the > > temperature is wavering around the threshold, the mitigation will be > > applied and removed every iteration, which is not very efficient. > > > > The use of hysteresis temperature could avoid this ping-pong of > > mitigation by relaxing the mitigation to happen only when the > > temperature goes below this lower hysteresis value. > Hi Amit, > > Can this not lead to ping-pong around the hysteresis temperature? That isn't how hysteresis is supposed to work if there is a sufficient delta between your trip point and your hysteresis value. e.g. if you have a trip at 80C and a hysteresis of 10C, it means that you will start throttling at 80C, but you won't STOP throttling until you cool down to 70C. At that point, you will wait again to get to 80C before throttling again. IOW, on the downward slope (80 -> 70) you still have throttling active and on the upward slope (70 -> 80), you have no[1] throttling, so different behaviour is the same temperature range depending on direction. If your hysteresis value was very low .e.g. 1C, it would certainly be useless. > If the idea is to minimize ping-pong isn't average a better method? We shouldn't ping-pong with the asymmetric behaviour described above. Regards, Amit [1] This is a simple example with a single trip point.