Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2398953pxu; Mon, 7 Dec 2020 05:46:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQdMuNB1yAF22eyVt9+OnkxVR8wmy+c7f2zqeibcQg4GvsXm/Ioz71dNnAgwWzi/efLs8a X-Received: by 2002:a05:6402:7d7:: with SMTP id u23mr8131783edy.325.1607348761461; Mon, 07 Dec 2020 05:46:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607348761; cv=none; d=google.com; s=arc-20160816; b=ScidpVRpBgu7FdDutIXs8s2fp1tZumSAQiuGf3WNH94nlZ0nxVYaxoFQSQbfMAS7G6 tm1v8AZnWDtmzaMTaKYmHgUsqQj4mOMYjEL5QRNZ5B/lkyib2QgXLhf7/GiUncYwdVUm JKjk7juA5GOF1uaBAvtu5Oa9QJKhGNV5OVi78q/OX8xQHh8vAGU3NzmBJdAU0aoXSV5X pokHo1A46JB3ZJtHDbQBk67c0TF6UYtqtuRhx9Tg7g/dT7EeSlg1wPPN3vXsL+oicnpK Y9oiw1r71mxOxE4v385G/iivPJaUi01RpyYRIlafPdEpf8N2Vh6YT+5cDIQ0c1yXsQIF sMWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=Sajsa5hnD4/l7bV/fF2j2mLOSef/O2Ms1lr8tdESjSo=; b=i8nJ7M+Gf0CVztcp0xP3OKdo791VfQTikoonCwtCCgjcZGZgluxE6G4YduBsFU1IZE jdHuy1gGibQT/TAgYAPuvfTP4jmDekqMpgB6D1AOhVQA7ZhrJ5Uw6sPJb+RuIleKtrIW JKXSbtpQ3d3D7TFHmlGdd5gFEYMz3Bst2dIj5Qx+9eIcS7t2LaNXU2KAke7gOzQl5YJK mSXiIOUoEq3pVNQEWhzI9c2BIHb6Z7nZhYODujdn3UFIpzfVpCLf7o2AEexxYVIJcsy0 di01wCRIBoEyAoaWju2L6sXjufnG8rSw/an8A5tRD1xevpRK0BBqlAoJP99MdlPqL2Qu uYhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h15si468476ejq.383.2020.12.07.05.45.37; Mon, 07 Dec 2020 05:46:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726177AbgLGNl5 (ORCPT + 99 others); Mon, 7 Dec 2020 08:41:57 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:33642 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726007AbgLGNl4 (ORCPT ); Mon, 7 Dec 2020 08:41:56 -0500 Received: by mail-ot1-f67.google.com with SMTP id b18so12469595ots.0; Mon, 07 Dec 2020 05:41:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Sajsa5hnD4/l7bV/fF2j2mLOSef/O2Ms1lr8tdESjSo=; b=K/w/A7eLcqbSNTzQIZKEt83wwglQ241ARxP16ueFuuRJ5pAX6KC9Kqbo42Kn3gB/K7 yJSUGkapkoIyd6tm1uQTUAehOU124VhgFA5LPlv8IoY6SNKib8dFHC9hnzUrfXwfYq4v CdzUWeBRSDGfpQcmtpegHw4bnhfLZ/PBRSPFKI+nV9XSSRRZ7HikYux6hA28/K28yDqm nuY0WdLdqfJezLZM93IZ/Xyk4k4yuRVKVzVSxvhcyJ8t7PyZE7AGuSIOyJss1RBIHhT+ ND/j8Ro4CUaf1vG/OAclmFjy33lyU4NPi7rdB0g7GcaJ5Cwn2p2CG7pOs4oPev1YphuE o33A== X-Gm-Message-State: AOAM532RuwTrjzdh+t3U+07Xk+CxvU7penk9LipqH0AhgzPHaYtvO55e 5U4vgsepMNMefdaW7ziljjQ6Y2CtCEqBonQCzwo= X-Received: by 2002:a9d:67da:: with SMTP id c26mr6057544otn.321.1607348469598; Mon, 07 Dec 2020 05:41:09 -0800 (PST) MIME-Version: 1.0 References: <1817571.2o5Kk4Ohv2@kreacher> <2174134.tL5yAn4CWt@kreacher> <20201207074615.kmvy5afoolhv5cgq@vireshk-i7> In-Reply-To: <20201207074615.kmvy5afoolhv5cgq@vireshk-i7> From: "Rafael J. Wysocki" Date: Mon, 7 Dec 2020 14:40:52 +0100 Message-ID: Subject: Re: [RFC][PATCH 1/2] cpufreq: Add special-purpose fast-switching callback for drivers To: Viresh Kumar Cc: "Rafael J. Wysocki" , Linux PM , LKML , Srinivas Pandruvada , Peter Zijlstra , Doug Smythies , Giovanni Gherdovich Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 7, 2020 at 8:47 AM Viresh Kumar wrote: > > On 30-11-20, 19:37, Rafael J. Wysocki wrote: > > Index: linux-pm/include/linux/cpufreq.h > > =================================================================== > > --- linux-pm.orig/include/linux/cpufreq.h > > +++ linux-pm/include/linux/cpufreq.h > > @@ -320,6 +320,15 @@ struct cpufreq_driver { > > unsigned int index); > > unsigned int (*fast_switch)(struct cpufreq_policy *policy, > > unsigned int target_freq); > > + /* > > + * ->fast_switch() replacement for drivers that use an internal > > + * representation of performance levels and can pass hints other than > > + * the target performance level to the hardware. > > + */ > > + void (*adjust_perf)(unsigned int cpu, bool busy, > > Maybe this should still take policy as an argument (like other calls) > instead of CPU, even if it is going to be used for single-cpu per > policy case for now. That can be changed in the future if need be. Otherwise this path doesn't need to look at the policy object at all and I'd rather keep it this way. > > > + unsigned long min_perf, > > + unsigned long target_perf, > > + unsigned long capacity); > > --