Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp130759imj; Thu, 14 Feb 2019 17:00:11 -0800 (PST) X-Google-Smtp-Source: AHgI3IbXy+yqeCbcYegrQ1yzudnMlc1s/upT2Ah/OgPPLsETyjPpBuRtC/PBiqsBjsByO6Cmi41y X-Received: by 2002:a63:f141:: with SMTP id o1mr2771028pgk.134.1550192411302; Thu, 14 Feb 2019 17:00:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550192411; cv=none; d=google.com; s=arc-20160816; b=CCOf6jUOO06R9CD4Hij8yIndlwxFXkm2ZAO5xAXF2s1gDq13mBD0wdhtJoHwLbcuLh itDMDKyyku1BrOZpOoiha3P10jaxXi0ssJJAiiGsh6U94OjgdQJbzs2htfxTgRPhmT9M HKOQBjUgYwnytbf3KgCVjfqewv+FrA8CoRHd/ceRq7yB3UJWccg5eWWAObY0WA1J9N3K 2s9AmkQLLI/Jo//aOTMW/BG7sX3Hw17R9Xob0jsskP7pmMPtG1xwbThPqjmWmPtReG/v +flAjQsGUOO7Jm09o1RxhkGSZDv8AkNbjoSYWr7g0dMrIVp1rbJe/dYeVA2jPqDzO/61 4Ufg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6oKGsFl3KFzaCsPTqB4+XI+ENpv9qnKFvpPnyA2yzUk=; b=FPYs/HYQWWqdInRNpbC4IPhHcDHlVw9rYi1/rX66GceQ7VejkEV2NqX8gb8/jk+OgB BsTDbVce1sxdQeposDJDiNxO+hcogBcBGJs9oqQKiO56+OJdr8EWMY63f+70j8SPS6zP 3c8ya9aiqVcx6+/FH8j6yAcwYlgbaUIxQjXR+iqJqzeNoO6H2nz2IEjueJ2/APkJmDUS PIi5kVNU75J1BrbX9RyF1t7RQ0AFoOudZH2kFHzNhDAEiprBQ+WvvWiWtBo+N688B4uM 6X2rHxOH/WbZxSs6k6fQ5O2wXxqbyX4m9Ppjby0oEuZvBBhUanNokrXF3wGKiabF2BOi K87g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=NC0usvaI; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si3584256pgu.525.2019.02.14.16.59.55; Thu, 14 Feb 2019 17:00:11 -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=@chromium.org header.s=google header.b=NC0usvaI; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389378AbfBNQ7u (ORCPT + 99 others); Thu, 14 Feb 2019 11:59:50 -0500 Received: from mail-pl1-f171.google.com ([209.85.214.171]:46565 "EHLO mail-pl1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbfBNQ7t (ORCPT ); Thu, 14 Feb 2019 11:59:49 -0500 Received: by mail-pl1-f171.google.com with SMTP id o6so3437760pls.13 for ; Thu, 14 Feb 2019 08:59:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=6oKGsFl3KFzaCsPTqB4+XI+ENpv9qnKFvpPnyA2yzUk=; b=NC0usvaI5uuSZnbo7c3PXX+jlxXVz8royWn8YUo75Q2AJ0LSKpDuCmuk9YrnyVlWkQ 66ZdLYNVWWCl2jg2stQaVsXwdzN2Jgmdb4fkxQHO1cpr9r8cjAWHX9OiiMNtJCI/QfN8 7wKtqGRuq5/4DgcDXjNkyy9ZvxAXVrhdeAIIE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=6oKGsFl3KFzaCsPTqB4+XI+ENpv9qnKFvpPnyA2yzUk=; b=E7YLqwXk5PaY/vRt4bFpMSYh+BE8Q7pSt+SRPEvcHmC75bcrP0Maa7PZW1Y2wtM69o O9hLf13yMx+bEoaVFJTKC67cRPQeBEq2fWdPGf4e03rWI3dh8CUU5ZpeKXVaIOWJoFmF wJgibY1kSKkL7Co4TtkyJuCUt69R6eJxARoEo1kN+w4upHe645TR4wSKrwBrmSFcNZ+f vAYiDgiy2GLrqtSKY/MKQvYkBzb+K4/BBuAdqb5mo6n7Zgv0ZZoZ2tMFH0mcJ4hN0EyR rMH3pqMta4o65+5fAMANv2C7EAybglhJUYozIquitsqXdjcNWerKFX2Y2L48WqLrmxKI 6kwg== X-Gm-Message-State: AHQUAuZbsoGRw7vyOdMx2ghesa/OLrfnJbeJhVD3LaLVnA8bwjX3aYBk +jUDcADlE228L36r45uV8PRjkQ== X-Received: by 2002:a17:902:5066:: with SMTP id f35mr5253312plh.78.1550163588984; Thu, 14 Feb 2019 08:59:48 -0800 (PST) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id j5sm3653268pfe.84.2019.02.14.08.59.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Feb 2019 08:59:48 -0800 (PST) Date: Thu, 14 Feb 2019 08:59:47 -0800 From: Matthias Kaehlcke To: Chanwoo Choi Cc: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Thierry Reding , Jonathan Hunter , Linux PM list , linux-kernel , linux-tegra@vger.kernel.org, Lukasz Luba Subject: Re: [PATCH 1/4] PM / devfreq: Track overall load monitor state instead of 'stop_polling' Message-ID: <20190214165947.GY117604@google.com> References: <20190214013042.254790-1-mka@chromium.org> <20190214013042.254790-2-mka@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chanwoo, On Thu, Feb 14, 2019 at 11:25:52PM +0900, Chanwoo Choi wrote: > Hi Matthias, > > 2019년 2월 14일 (목) 오후 7:16, Matthias Kaehlcke 님이 작성: > > > > The field ->stop_polling indicates whether load monitoring should be/is > > stopped, it is set in devfreq_monitor_suspend(). Change the variable to > > hold the general state of load monitoring (stopped, running, suspended). > > Besides improving readability of conditions involving the field and this > > prepares the terrain for moving some duplicated code from the governors > > into the devfreq core. > > > > Hold the devfreq lock in devfreq_monitor_start/stop() to ensure proper > > synchronization. > > IMHO, I'm not sure that there are any benefits changing > from 'stop_polling' to 'monitor_state'. I have no objections > if Myungjoo confirms it. I agree that as an isolated change there isn't a clear benefit. However in the context of the series the change is needed to avoid resuming a load monitor that wasn't even started. In case this series isn't accepted I'd still suggest to change the name from 'stop_polling' to 'suspended'. I read 'stop_polling' as a call for action, while 'suspended' is a state. IMO at least in some contexts conditions using a state is clearer. Cheers Matthias