Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2007077imu; Thu, 17 Jan 2019 06:57:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN4H5L6kS5/DhTxvN4ntjPH0ziPF5EgqYKZtvsGgEqVjUnNFkTAFrQ3nZ5kYuEUzzWIVb+XE X-Received: by 2002:a17:902:8a91:: with SMTP id p17mr15369614plo.316.1547737046567; Thu, 17 Jan 2019 06:57:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547737046; cv=none; d=google.com; s=arc-20160816; b=PzscAep/eingYIIqwd5GTn0B8JUC4m3hBvZCys65lIfU63vVsv9jjpjF4JxIzclHNW RQKDzt8FF34LPwQYL+dv0cymI6/7mEJ9IQZp2L7dBBE3U6jcdC7h97sGwB8Zkv4VHcVn nrxroe1xi3e9Wt6WSRSHTFeWhSVy5JUBMwGNt4H8fqkCEPOCb9/aVhAwEg8hiPK09047 OlRSKQ51DoDB5L/cwtyQM3xTm5MgBwoLS6HBCFRYlL8fun3HdYY81O2gDY3GbY4O8i/W zIGJQhzeaSuEL2aRiFjqFjf0UF1cy1eVTULoIORiRZUbi39JH95lqqrUKOprBG4k360y f/+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=N2HYeH6mHxP/yO8c9bxtPPQl8N3D6FtQoulXTsajARU=; b=fP62pm//QECosdUYSFEnI5yU5NCWaWp+6ek+wT6YzYtz6H8su1Z1fvjLsuxnT8f7KT 1cbzcwiq/KTXjcLH1oINH0o+8UIPZIXboTyi4VR/Xl4H8vKLE3eKRy7mgxA1kZ03dffj Vkva2EucGro8+Hz4vlY1IQDdNrIfvfrsnYWJJ8ZrRUEJ33irNf1y4EWZ4VahDmuCNYpS zbzLht9pSvxTMVMcoir/+nWHpsRI79zJAC/ZPh2G5IWoHRG52jVe+GmxCuJOgCuTXLFw 4coZ8JRdinr2SdrYCgdHUMKSqEoGLhmexFkvputxBw6cfhmxTrEE05Qxao7m+xb3545+ fYqA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 69si1939290pla.75.2019.01.17.06.57.11; Thu, 17 Jan 2019 06:57:26 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727822AbfAQOz0 (ORCPT + 99 others); Thu, 17 Jan 2019 09:55:26 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:42147 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727708AbfAQOz0 (ORCPT ); Thu, 17 Jan 2019 09:55:26 -0500 Received: by mail-ot1-f65.google.com with SMTP id v23so11315796otk.9; Thu, 17 Jan 2019 06:55:25 -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=N2HYeH6mHxP/yO8c9bxtPPQl8N3D6FtQoulXTsajARU=; b=BalQnyYW1wNVcwHMc3GMcA0gwoDlHqqNYh0zAUabwAzzdu2mG1Nbqq/l49GfQCGE0B tj4lUDXxTmhvjNObL0LQxMPYJZmAsy3dl5MpA04JBFKX0MnZM5Yj3aSHCDEJgS4XiYIQ z4JMb2lapPAWDroL+xOb3L6Hc/Skl0LMP7Lg89ryPJXLALs92IMo0TgdvJDnXUlXbkbq 52xSgkIkI+TbAfUf9GyDzzuvBNZHZfSbz3DMszf0tVGU8GhPnAPqTJoaXmKXbSlXP9Fj ZUbyN4A/Enj3tcIuNOiTwaW7NWaYMbnYM6fd8MyiPGhpvo6fHFsRQQhhDzRD13WXQvuN lF4g== X-Gm-Message-State: AJcUukfzYpdKxUOyFXk1OXBnZLx6yszPFTm6SmzIdr2YMPndnX2XWlla 9rJlf3q+yX8AfN9loUeT32FnJQRn4lA2jwRQDsg= X-Received: by 2002:a9d:2062:: with SMTP id n89mr8414473ota.244.1547736924605; Thu, 17 Jan 2019 06:55:24 -0800 (PST) MIME-Version: 1.0 References: <20190117131631.GA14385@localhost.localdomain> In-Reply-To: <20190117131631.GA14385@localhost.localdomain> From: "Rafael J. Wysocki" Date: Thu, 17 Jan 2019 15:55:12 +0100 Message-ID: Subject: Re: [PATCH 0/3] drivers: Frequency constraint infrastructure To: Juri Lelli Cc: "Rafael J. Wysocki" , Viresh Kumar , Rafael Wysocki , Greg Kroah-Hartman , Viresh Kumar , Linux PM , Vincent Guittot , Matthias Kaehlcke , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 17, 2019 at 2:16 PM Juri Lelli wrote: > > On 11/01/19 10:47, Rafael J. Wysocki wrote: > > On Fri, Jan 11, 2019 at 10:18 AM Viresh Kumar wrote: > > > > > > Hi, > > > > > > This commit introduces the frequency constraint infrastructure, which > > > provides a generic interface for parts of the kernel to constraint the > > > working frequency range of a device. > > > > > > The primary users of this are the cpufreq and devfreq frameworks. The > > > cpufreq framework already implements such constraints with help of > > > notifier chains (for thermal and other constraints) and some local code > > > (for user-space constraints). The devfreq framework developers have also > > > shown interest [1] in such a framework, which may use it at a later > > > point of time. > > > > > > The idea here is to provide a generic interface and get rid of the > > > notifier based mechanism. > > > > > > Only one constraint is added for now for the cpufreq framework and the > > > rest will follow after this stuff is merged. > > > > > > Matthias Kaehlcke was involved in the preparation of the first draft of > > > this work and so I have added him as Co-author to the first patch. > > > Thanks Matthias. > > > > > > FWIW, This doesn't have anything to do with the boot-constraints > > > framework [2] I was trying to upstream earlier :) > > > > This is quite a bit of code to review, so it will take some time. > > > > One immediate observation is that it seems to do quite a bit of what > > is done in the PM QoS framework, so maybe there is an opportunity for > > some consolidation in there. > > Right, had the same impression. :-) > > I was also wondering how this new framework is dealing with > constraints/request imposed/generated by the scheduler and related > interfaces (thinking about schedutil and Patrick's util_clamp). My understanding is that it is orthogonal to them, like adding extra constraints on top of them etc.