Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2272389imb; Mon, 4 Mar 2019 00:22:32 -0800 (PST) X-Google-Smtp-Source: APXvYqweOruUzhNK+0I6V+5T66/1uqtRzMGEGnQoIAjoq3IGKHFEhjBOoOW3kLj6eLfVkfFxwRP8 X-Received: by 2002:a17:902:a7:: with SMTP id a36mr19312799pla.267.1551687752765; Mon, 04 Mar 2019 00:22:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551687752; cv=none; d=google.com; s=arc-20160816; b=TA4K7t1DzCW/em9NwzOSnsi1uQqCKXSq0Zu4OILZCeQLfqgC/8jlsZEOXydDf5YtCk q5s3rcDY1aus62YN2qkJwlF3VUBxv7EdEYVD654XsIecp+LEpJ0MaGl6QCi9OneVNTnW DvDWlwwXxPgUhfc07iOLwUUfSM/oHAP9zdSwRvPeCtmNOIRGUwFswVwwTa5vbLsP1e50 p7zNrcS87h0RFSbgEmNdOYoNwGkf75JTaN8hZi35NbQNzgez6VvI6MDR4WYvKCd3RHg0 qzN2Gcw61alGSwx0EQiLDGsWabfczTzMkhI8X5lQ0/8EGSjAK0Gcu+nj/xZJhi2rnrwv WI2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=t03MYKZwLKRmbq1wZvZCzMBLBSpLmWlKuYEjrJ+4OQk=; b=FdeUovhiXJjVHdiHsTcdY48uhzGrsGUkwma8beZpWI5sH7fZF+rYAb1w28i7NJU9bt YR1oLkUMBkT1msxOvycqbSxj4eEsvRT/1nfNjKXO/CJirENgrwdSBSomHrINZTYhMDrq Hz1nBzqsOFNrplCoad8X+DrcznQgU7KhZd4slYrtP81vGIOuIsJa/k+cVU1EKbc8LPuh arVVcXdkKvjAtJCOr7ArULoICrR3Ul1LFgVbb+fQBR1PbCGQF+R3sBZpVgWTZaBlM1u+ VRVNTAz/wqapK8NVwmiAkljRNYVW4sKf11l6iLG9FwJaj9u2nQ7AAkfiC2/EJD6PzPxI hB1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=jGGtCLan; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZNTSe3s8; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u37si4534521pgl.128.2019.03.04.00.22.16; Mon, 04 Mar 2019 00:22:32 -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=@codeaurora.org header.s=default header.b=jGGtCLan; dkim=pass header.i=@codeaurora.org header.s=default header.b=ZNTSe3s8; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726076AbfCDIVz (ORCPT + 99 others); Mon, 4 Mar 2019 03:21:55 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:41260 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725974AbfCDIVz (ORCPT ); Mon, 4 Mar 2019 03:21:55 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 11BE06087D; Mon, 4 Mar 2019 08:21:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1551687714; bh=XZu0XN/gc73B1S7k7lNJOkGYk1wFa69a/kuIxy0IpdI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jGGtCLanDeJyssiSvIP1TR+sQsFHkB/4VZAC0bQJanwDzPvqUiSm4N2yZegyZPjMT K6moqOb8N3Xn+RyetW0p5YSYf/+Ddkg4PcGkjxZ0MiD0RXYVcJFs9nOirqlp7rlExv 6RW2EbWF7VpJhKP+gjQzgUVjyM2oE0JmvVDa5LdM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 2E64560744; Mon, 4 Mar 2019 08:21:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1551687713; bh=XZu0XN/gc73B1S7k7lNJOkGYk1wFa69a/kuIxy0IpdI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZNTSe3s8JP4Vj2dH40bGHB6cQppUpgs2ydpGHCjl7VBVvD9MwUwQDAsqbH5jgtCoH fe+HExYUejdGRrnf3B2yHsLiIw29FWaGFr5n/6mz2hXCpIgduTRZ/bUnWNaDXWTGuG 3j1o/T1LXDZmxFLxCaRRIqJW15GmdcEPdKallom8= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 04 Mar 2019 13:51:53 +0530 From: Sibi Sankar To: myungjoo.ham@samsung.com, Kyungmin Park Cc: Chanwoo Choi , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm-owner@vger.kernel.org, skannan@codeaurora.org Subject: Re: [PATCH v4] PM / devfreq: Restart previous governor if new governor fails to start In-Reply-To: <39d3a906-b734-9bb8-c60a-48948bb21338@codeaurora.org> References: <20181212135313.30268-1-sibis@codeaurora.org> <20181214014527epcms1p6c783b4cd1602bbcbcb6e725f840db479@epcms1p6> <39d3a906-b734-9bb8-c60a-48948bb21338@codeaurora.org> Message-ID: <946aa4e13aec4f84e6ae2d91e772fb1f@codeaurora.org> X-Sender: sibis@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey MyungJoo, Kyungmin Did you get a chance to think about how you want this fix implemented? On 2019-02-19 10:42, Sibi Sankar wrote: > Hey MyungJoo, > > On 12/14/18 7:15 AM, MyungJoo Ham wrote: >>> From: Saravana Kannan >>> >>> If the new governor fails to start, switch back to old governor so >>> that the >>> devfreq state is not left in some weird limbo. >>> >>> Signed-off-by: Sibi Sankar >>> Signed-off-by: Saravana Kannan >>> Reviewed-by: Chanwoo Choi >> >> Hello, >> >> In overall, the idea and the implementation looks good. >> >> However, I have a question: >> >> What if the following line fails? >> >> + df->governor->event_handler(df, DEVFREQ_GOV_START, >> + NULL); >> >> Don't we still need something to handle for such events? > > The original discussion went as follows: > governor_store is expected to be used only on cases > where devfreq_add_device() succeeded i.e prev->governor > is expected to be present and DEVFREQ_GOV_START is > expected to succeed. Hence falling back to the previous > governor seems like a sensible idea. > > This would also prevent DEVFREQ_GOV_STOP from being called > on a governor were DEVFREQ_GOV_START had failed which is > ideal. > > That being said DEVFREQ_GOV_START can still fail for the > prev-governor due to some change in state of the system. > Do you want to handle this case by clearing the state of > governor rather than switching to previous governor? > >> >> Cheers, >> MyungJoo >> >> -- -- Sibi Sankar -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.