From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7AF6C31E5B for ; Mon, 17 Jun 2019 23:14:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8D1FD20673 for ; Mon, 17 Jun 2019 23:14:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726721AbfFQXOS (ORCPT ); Mon, 17 Jun 2019 19:14:18 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:64487 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726685AbfFQXOS (ORCPT ); Mon, 17 Jun 2019 19:14:18 -0400 Received: from 79.184.254.20.ipv4.supernova.orange.pl (79.184.254.20) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.267) id a2a8451e21f77331; Tue, 18 Jun 2019 01:14:15 +0200 From: "Rafael J. Wysocki" To: Viresh Kumar Cc: Len Brown , Pavel Machek , Kevin Hilman , Ulf Hansson , Daniel Lezcano , linux-pm@vger.kernel.org, Vincent Guittot , Qais.Yousef@arm.com, mka@chromium.org, juri.lelli@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH V3 2/5] PM / QOS: Pass request type to dev_pm_qos_read_value() Date: Tue, 18 Jun 2019 01:14:15 +0200 Message-ID: <6646229.IQO0cWAbFE@kreacher> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Monday, June 10, 2019 12:51:33 PM CEST Viresh Kumar wrote: > In order to use dev_pm_qos_read_value(), and other internal routines to > it, to read values for different QoS requests, pass request type as a > parameter to these routines. > > For now, it only supports resume-latency request type. I don't quite like the structure by which the type arg is passed through the entire call chain until the switch in dep_pm_qos_raw_read_value(). There is only one direct user of dev_pm_qos_raw_read_value() AFAICS which is cpuidle. It shouldn't need to suffer the general case overhead, so I would rename that function to dev_pm_qos_raw_resume_latency() and update cpuidle accordingly. Moreover, the callers of __dev_pm_qos_read_value() are interested in the resume latency value too, so it might make sense to rename this as __dev_pm_qos_resume_latency(), update its callers and put the switch into dev_pm_qos_read_value(). Plus the changelog should explain the broader rationale of this change like for the first patch IMO.