Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp490495imm; Fri, 1 Jun 2018 04:45:16 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI8mXQTQFYHOR7Cpb7FnyTT66jY7afor5bLcPdaWIWllPWF3QDuIy8zLzMDNiHHYRo0fr7w X-Received: by 2002:a62:a09c:: with SMTP id p28-v6mr10614264pfl.9.1527853516260; Fri, 01 Jun 2018 04:45:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527853516; cv=none; d=google.com; s=arc-20160816; b=TQSeQ3fPOQPX/5vfofvBWeu6rapP3513furi4cVCpZJbz5GKwMwdfByj4CeScGTNHo jIIy7WwSlHWAw59s6vvgpTDc6WTiUDS3+uFHuIcjoprNArsMBrrBOmTI+NPSw41nN+g7 HHfe71jkCOWQOUpbyPi9N57DMgfZg5Pj6YiljmOaMDqVHVvQZjxP897nPFB9m/8Nk3mh MCUwJuSIff7kM7lFmtSkPJwfk0YgQw7BX2F9FF/XgShRSKZpg1BatJIG0e6blPRMtuf9 2ABQP4Hx9/vZL6AgEsas/3hmL++sOHoQLe5wuLmqDejyWc9N4qh1ElXT2KSx79zc7aYi JjtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=Pfo9Qao9AE6NvpP+iX/EKar/mGbxzxfIpbTTyR5WciI=; b=AXUoFw+kYUO/hzMrfOkyljVnNyFXQugE0fR3dghCImuK6BbUw3nYXv8/WzeqPDPjjq 5XIHltExEVcwyiR8tGdQu1EoTfLE4lIQB25uXOANofSjUSz0oFI6GfwIE/syj8eO+tvH HjvMTIZEYFPR5i+LYnUll6qKNlPp8636+FZ/QB5xsY0FYq2Z7MdUz2M7QQkwCbG8vFCX wZ2iUuJ0O3QugVUdSZTtgVjLw7dF01k6lNg3+oT6QgSHFtgmVa/0WLkH+17a9FUZ2ltM ytnJjUOzdzz69CYIE75IK1YaP60syZo+zqrWo6vOW55QUrRhOhMT10FtgvaGUCKjpApp B5RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=RilKYRyQ; dkim=pass header.i=@codeaurora.org header.s=default header.b=O83WHG1Y; 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 f5-v6si15572160pln.414.2018.06.01.04.45.02; Fri, 01 Jun 2018 04:45:16 -0700 (PDT) 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=RilKYRyQ; dkim=pass header.i=@codeaurora.org header.s=default header.b=O83WHG1Y; 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 S1751961AbeFALoA (ORCPT + 99 others); Fri, 1 Jun 2018 07:44:00 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:49498 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751605AbeFALnx (ORCPT ); Fri, 1 Jun 2018 07:43:53 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 58C516074C; Fri, 1 Jun 2018 11:43:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527853432; bh=Sj6cAOkCO0xqNNcnaERiI/f9GvpBttS70HOkUuuV9HY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=RilKYRyQzeFtRotrah5RRWbOS6vujLGPRbwD/STWUASxR93NAT+sFffO9Nn8T3Br1 s+sqwSiku18q+qzVwaKPieVXUJ2Z4ICkEWSF2OmaNWQVTHkIXSaFqtZWvLD+lJSk3x 7HCojBi6RSAqolWwecX9VDeJ+7PhMdy97EWaESeo= 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.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.204.66.249] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: akhilpo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 99E5260263; Fri, 1 Jun 2018 11:43:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527853431; bh=Sj6cAOkCO0xqNNcnaERiI/f9GvpBttS70HOkUuuV9HY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=O83WHG1YXksKnWCJtyuwgjVFlIOsxaeaBSQrO8g7mK9C7YxsCsMpAJ2nSFhxhzdYy y3WHr0rKXnUuB+/C89kn8xeUfCfRRhV/k9HXdSSCqC/7VJz9CIdIPPX6q5XWndkT8A jxZ3cHt8qutpX6hy4slYebGZM0HLzWvYeM9ZiQ/U= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 99E5260263 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=akhilpo@codeaurora.org Subject: Re: [RFC] PM / devfreq: Add support for alerts To: myungjoo.ham@samsung.com, "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "mka@chromium.org" Cc: "jcrouse@codeaurora.org" , Kyungmin Park , Chanwoo Choi , "linux-arm-msm@vger.kernel.org" References: <1527745019-25155-1-git-send-email-akhilpo@codeaurora.org> <20180531061720epcms1p31f5451bcf3150a7dddd33e1e415bb730@epcms1p3> From: Akhil P Oommen Message-ID: Date: Fri, 1 Jun 2018 17:13:47 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180531061720epcms1p31f5451bcf3150a7dddd33e1e415bb730@epcms1p3> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/31/2018 11:47 AM, MyungJoo Ham wrote: >> Currently, DEVFREQ reevaluates the device state periodically and/or >> based on the OPP list changes. Private API has to be exposed to allow >> the device driver to alert/notify the governor to reevaluate when a new >> set of data is available. This makes the governor more coupled to a >> particular device driver. We can improve here by exposing a DEVFREQ API >> to allow the device drivers to send generic alerts to the governor. >> >> Signed-off-by: Akhil P Oommen >> --- >> drivers/devfreq/devfreq.c | 21 +++++++++++++++++++++ >> drivers/devfreq/governor.h | 1 + >> include/linux/devfreq.h | 5 +++++ >> 3 files changed, 27 insertions(+) >> > Hello Akhil, > > It appears that this will have the same effect with > "[PATCH 08/11] PM / devfreq: Make update_devfreq() public" from Matthias Kaehlcke, doesn't it? > > > Cheers, > MyungJoo > Hi MyngJoo, The patch you mentioned is a step in the right direction. But this patch allows: 1. the governor to decide whether to reevaluate or not. I feel it would be a better architecture (better Separation of Concern) if that decision is left to the governor alone. 2. the devices to share multiple types of alerts. A governor may use these alerts for internal bookkeeping/algorithm and decide to reevaluate policy when it is necessary. Since we are opening up a new devfreq API for devices, isn't it better to go for a generic one? Regards, Akhil.