Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp183117imj; Thu, 14 Feb 2019 18:09:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IYaW8ajd8I63IEOVz2KY4ARvWUE9nOFEXpOdz4AtU6L8DGc49t7THn5YS/QnIc/InXrZUo2 X-Received: by 2002:a65:62ca:: with SMTP id m10mr2973422pgv.6.1550196581652; Thu, 14 Feb 2019 18:09:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550196581; cv=none; d=google.com; s=arc-20160816; b=gguq+V/zrwSo6SGjT4Q4z4RXeNi2SmytegY+5gZ3j1KiZvZhSZc3lrkIHTfUaw2zyH IflMu8u6GRecBtisqMKoqDkNDPUUj2dJILu5YSsHrXywc51RD1JxqOEXaGFvkEWA7shO OPr7crHRlbYX4KXl2A0A76IgWwdtcjsEyLyrAuOSgy+QNW2p+Q6owusnEfxhlJIZIJ+8 4JW81gNxKCSJzlSX0Ho9Fk/4MQKYDboNz68pcHUyQfInOGgtzeJPhAvFgrybdX3okuTj YSXSGT+mCrEc7Wz7oeYo0byZ6Pr1o9IIMHSWoZM9/qTnogzJwWD4ZTmQiORxQp55L9Az tEsA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gBqIfKsCtR6NSnAzbURnQ4JIzuSfGeTDH9ZcgF/BChA=; b=qYyotirRYfnGfhw7oWL8Ut0xmqi6a7B8AsE9cxqsrWYbArfb0Kvd/mEHRWr3wz//4w AHOqG9VK/fzIReaSlHFVUi/SWveaqHvodTyBX1m3jgCSyP6M4madf79kKCLyOUXJv0t8 hVxZiGFYSZYGquj1CxTwe3Nou8Fa6f/ZkYECehup76QkC5czWnkE8o44ClQx2Zek5AIj fj2EGUzen1nz+LL5DUiq/a5UlJF4PkHjeUjfpgKKJV+IGf0VIDPGxehAAxAhqi4rcn1K OYcRSZwig6/WP9Xm9o84+8lZc910RgAHzpx001MNdwuuRvIdOTqH4mviukWhLWCAkbbF hOEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Uvt4l4U9; 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 o3si3987242pgq.139.2019.02.14.18.09.26; Thu, 14 Feb 2019 18:09:41 -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=Uvt4l4U9; 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 S2405715AbfBNT25 (ORCPT + 99 others); Thu, 14 Feb 2019 14:28:57 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:41139 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726010AbfBNT25 (ORCPT ); Thu, 14 Feb 2019 14:28:57 -0500 Received: by mail-pg1-f194.google.com with SMTP id m1so3543531pgq.8 for ; Thu, 14 Feb 2019 11:28:56 -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:in-reply-to:user-agent; bh=gBqIfKsCtR6NSnAzbURnQ4JIzuSfGeTDH9ZcgF/BChA=; b=Uvt4l4U9ZqfyD5D5FI0zlLAohl+8AnmwGicsKUQFtR2VfxDbE8bOdy+Sf2sOa5GjqN Y3gZsjtx/kp/4J494Qun4kNC9/iIwEtfL8Ko0nkhF3vYe5DReIEPnnB7KEvAnJCEkvo2 ksleHSE1SKlG3aJuoVsQZxxRthGxfxdhp35Lo= 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:in-reply-to:user-agent; bh=gBqIfKsCtR6NSnAzbURnQ4JIzuSfGeTDH9ZcgF/BChA=; b=b3UuF/zTjC79eo8yL1n4DvPtOMQIxXw0Mq+Q0H0QnY+3IN9FUb/nPPhI53QlYFHh02 QwaHrSxQb2KFy4aUsQR2iKJwCXWCbieR5p88ub+kb/9lvPwFPUi26ChxM4KZNz+DIb9I jZtuBP7kagYHRqEgeP4SRd2TTeKn0cQjvSrZ6TZiFGUKG7VnuygN9xyu1CguxdCIrU+H 7U0PPyMkN2dsUdAny8lCrVvNyjw7wzC8belAs2kxA6QOx1Adk15yTJzLQ7u9dzfohlvg phWXMHtmctSlcWXq2uJqFWfIMftBv2Glmvhm14z3d63+zufeSVbLiKHH/NLiXNgOGDnV cXTA== X-Gm-Message-State: AHQUAuZLQlFLtQQT3Sxulu+a6MP0RwIrDD79IQQ56W7S8oo79m87DAXF AR36gbuF03NauiKBEcFSd/Uz/w== X-Received: by 2002:aa7:87c6:: with SMTP id i6mr5695060pfo.208.1550172536376; Thu, 14 Feb 2019 11:28:56 -0800 (PST) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id e63sm8977550pfc.47.2019.02.14.11.28.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Feb 2019 11:28:55 -0800 (PST) Date: Thu, 14 Feb 2019 11:28:55 -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 4/4] PM / devfreq: Handle monitor start/stop in the devfreq core Message-ID: <20190214192855.GD117604@google.com> References: <20190214013042.254790-1-mka@chromium.org> <20190214013042.254790-5-mka@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline 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:17:36PM +0900, Chanwoo Choi wrote: > Hi Matthias, > > As I commented on the first patch, it is not possible to call some codes > according to the intention of each governor between 'devfreq_moniotr_*()' > and some codes which are executed before or after 'devfreq_moniotr_*()' > > For example, if some governor requires the following sequence, > after this patch, it is not possible. > > case DEVFREQ_GOV_xxx: > /* execute some code before devfreq_monitor_xxx() */ > devfreq_monitor_xxx() > /* execute some code after devfreq_monitor_xxx() */ As for the suspend/resume case I agree that the patch introduces this limitation, but I'm not convinced that this is an actual problem. For governor_start(): why can't the governor execute the code before polling started, does it make any difference to the governor that a work is scheduled? For governor_stop(): why would the governor require polling to be active during stop? If it needs update_devfreq() to run (called by devfreq_monitor()) it can call it directly, instead of waiting for the monitor to run at some later time. Cheers Matthias