Received: by 10.223.185.116 with SMTP id b49csp972065wrg; Fri, 16 Feb 2018 10:06:46 -0800 (PST) X-Google-Smtp-Source: AH8x225tD2Q+3muRDH+jtHdPjlcNMdUpDVATiTtptkq1Xm1xX8eaqhcp+B1nE19WDzi1QkJwmMpB X-Received: by 2002:a17:902:24a5:: with SMTP id w34-v6mr6459863pla.221.1518804406714; Fri, 16 Feb 2018 10:06:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518804406; cv=none; d=google.com; s=arc-20160816; b=Tg2HVST9F+eOZAVT1z7hVLDAFof/euMNtp3qPLPwcGasd27wh/d+/AWj9joM71/H09 HVz3MX5OVDQ1DRuRW2V7/a1keuJnACpAzSfr5/H1rR+dLr0IDEzWzMcjwcakewID8zrU ixrGYC813ON2gPfAzubfu0iC0qa6gGGX3Xh96BiaYCaJn85BDCJxhhW/c6UXxz0S+82f UQvgBkv1a37P+d/yDEXQCtmkn68BKwfPGRsMgwRsd0sCajCkMBDbqc4MIpJjPsf8xmc4 mgJ6NjQHBQQSi+RSuVP+8lTsYot79iUdFcpK/Ic9jdjVzT05qrLDv+i1x/xckh2aqno+ Fbtg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=lSG+qfjaxqbJD+0erU4Jpi0JUJKfX+jbxnAE7MgBwCg=; b=FFrO4Cdxm5UZOUG0mA41fzF8NN44ufR+YSkJDyvAp+/zU0QqwMjmFZS+mMRclCP5G5 N5cN48BkakLizwXa74j5+PMG9KosPG7Zk7+yinCY1J86jJw/aHHCk8OF4e8/ZCVDsxaH stR4A1bTB0nEHvwQ43m51UH9rQaGlJnJCZiXNm8c5KPUTkm4iwrb9uyagk+MYXefHzDI bnyuljxvUxwOogID3B3E1AreR6Vh77D8aUsNWRnf5wLEIk2hOgDHxl7wAKuXFCQbEfW5 By3axznrXdeH63UX4c6VXlUR5dIIGzIvv3/c3AzPs0bp4M5J15nFZfqhJlrkgez5J/L9 JSQg== ARC-Authentication-Results: i=1; mx.google.com; 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 u136si1281594pgc.784.2018.02.16.10.06.31; Fri, 16 Feb 2018 10:06:46 -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; 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 S1164364AbeBOWIc (ORCPT + 99 others); Thu, 15 Feb 2018 17:08:32 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:49146 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162892AbeBOWIb (ORCPT ); Thu, 15 Feb 2018 17:08:31 -0500 Received: from 79.184.255.223.ipv4.supernova.orange.pl (79.184.255.223) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id 4dc6e24438e3fa12; Thu, 15 Feb 2018 23:08:29 +0100 From: "Rafael J. Wysocki" To: Saravana Kannan Cc: Viresh Kumar , Bo Yan , sgurrappadi@nvidia.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended Date: Thu, 15 Feb 2018 23:06:39 +0100 Message-ID: <2807403.a9gdqJGhH8@aspire.rjw.lan> In-Reply-To: <5A85FB2E.2050407@codeaurora.org> References: <1516744675-21233-1-git-send-email-byan@nvidia.com> <20180205090546.GE28462@vireshk-i7> <5A85FB2E.2050407@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, February 15, 2018 10:27:10 PM CET Saravana Kannan wrote: > On 02/05/2018 01:05 AM, Viresh Kumar wrote: > > On 05-02-18, 09:50, Rafael J. Wysocki wrote: > >> By design (which I admit may be confusing) it should be fine to call > >> dpm_resume_end() after a failing dpm_suspend_start(), whatever the reason > >> for the failure is. cpufreq_suspend/resume() don't take that into account, > >> everybody else does. > > > > Hmm, I see. Can't do much then, just fix the only broken piece of code :) > > > > Sorry for the late reply, this email didn't get filtered into the right > folder. > > I think the design of dpm_suspend_start() and dpm_resume_end() generally > works fine because we seem to keep track of what devices have been > suspended so far (in the dpm_suspended_list) and call resume only of > those. So, why isn't the right fix to have cpufreq get put into that > list? Because it is more complicated? > Instead of just always call it on the resume path even if it > wasn't suspended? That seems to be the real issue. > > So, we should either have dpm_suspend/resume() have a flag to keep track > of if cpufreq_suspend/resume() was called and make sure they are called > in proper pairs. Why? > Or have cpufreq register in a way that gets it put in > the suspend/resume list. > > I'd still like to NACK this change. It's gone in already, sorry.