Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3338205pxk; Mon, 5 Oct 2020 07:21:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoBD19uEAmylJsQt4voCsHd5G6yiaKc3POb7P81M+hLmAMSErw8IzomnHXnYMFlYick49e X-Received: by 2002:aa7:d7ce:: with SMTP id e14mr5733111eds.258.1601907666389; Mon, 05 Oct 2020 07:21:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601907666; cv=none; d=google.com; s=arc-20160816; b=haRk8bcNZyvSHbN9PRaPihs2GgoLCMb+UYHrAYQxW+koizqD6BWm86hvszOcylcQVO zEaP3+Lfbq3na6+FFVWZt5/eI1HzJxHd1Nx6RWhG1XvD5TwqAsK85ZUtZidCPYSQLbmt uQN4FpjcKqkJ0+AXHgDyzPDpte19MsCPyk/kn3mwWlWbRT21XzPhSlhhxbIG6qIRchSg RWgQ7KmMi1ieK3nQAS6V+z82DGgbghiX1ipgL8L5s/aLzQBdFHEQquZN3FX3sWLbDtLV c0AUkKpvpG71Q366mkNmbs+Tca6xOOWKXRXXGZKFEtyoTZ2GWyar1Q6/fVxunQPdb24c tDmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=uxAbSn5iuW7/MieJ/5dseSbv7CZpwyQpt5rGrKEUIbI=; b=Y7bNFHJQnjmmp1vI0JGu0k68fpH+YVjxoFV4brF81EYKoYCr2Zh8bFrsCpYED9bBF9 /Q+ODbLgGjjOA9sokgf1kAlUTf0fRcYg7P61Ts+E18zJpxIZNQzaN+dm2ZMmAR6GoIez u0QDL9/jB+y5ThoNmpFDsmcxv+jVfWtd8GSgiwVtR4tkMyLxRKnA27D10I1f5YitRrnE v8hKW2/H8fUOlbeECmJ5nghBa4+sb+NI9OFNz2WklwSvZFHK9VzNs7RYK0cVVVmpm3CM Zaq+787CqLhNkSQHaYhZDKWd/5NHBGQ/OTJmKDa/scZO1dO8cV0hyu/kywZPPOYMOrMg FUiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail header.b=aTfwPVgH; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k16si7111199ejd.538.2020.10.05.07.20.42; Mon, 05 Oct 2020 07:21:06 -0700 (PDT) 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; dkim=pass header.i=@protonmail.com header.s=protonmail header.b=aTfwPVgH; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726064AbgJEOTV (ORCPT + 99 others); Mon, 5 Oct 2020 10:19:21 -0400 Received: from mail-41103.protonmail.ch ([185.70.41.103]:16221 "EHLO mail-41103.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725995AbgJEOTV (ORCPT ); Mon, 5 Oct 2020 10:19:21 -0400 Received: from mail-02.mail-europe.com (mail-02.mail-europe.com [51.89.119.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by mail-41103.protonmail.ch (Postfix) with ESMTPS id C19CF203178B; Mon, 5 Oct 2020 14:19:19 +0000 (UTC) Authentication-Results: mail-41103.protonmail.ch; dkim=pass (1024-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="aTfwPVgH" Date: Mon, 05 Oct 2020 14:19:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1601907556; bh=uxAbSn5iuW7/MieJ/5dseSbv7CZpwyQpt5rGrKEUIbI=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=aTfwPVgH+B9AibxU1wj/5tQ/JGcdsBDYi5o7DlUYLmBe3ucy24ssGQ2Vip9E79drh y6PY0wOsGOrqQZjEPIF6x4MXlp/kHlI1vfsSNDpTUOIZolTjIWU3qYZRToIl63gbbY 3CR7oaGJ7Bh0dfF/f/2dH8trNijKyZ/W3O0tK0gQ= To: "Limonciello, Mario" From: =?utf-8?Q?Barnab=C3=A1s_P=C5=91cze?= Cc: Hans de Goede , Darren Hart , Andy Shevchenko , Mark Gross , Mark Pearson , Elia Devito , Bastien Nocera , Benjamin Berg , "linux-pm@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "platform-driver-x86@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Mark Pearson Reply-To: =?utf-8?Q?Barnab=C3=A1s_P=C5=91cze?= Subject: RE: [RFC] Documentation: Add documentation for new performance_profile sysfs class Message-ID: In-Reply-To: References: <20201003131938.9426-1-hdegoede@redhat.com> <20201003131938.9426-2-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi 2020. okt=C3=B3ber 5., h=C3=A9tf=C5=91 14:58 keltez=C3=A9ssel, Limonciello,= Mario =C3=ADrta: > > On modern systems CPU/GPU/... performance is often dynamically configur= able > > in the form of e.g. variable clock-speeds and TPD. The performance is o= ften > > automatically adjusted to the load by some automatic-mechanism (which m= ay > > very well live outside the kernel). > > These auto performance-adjustment mechanisms often can be configured wi= th > > one of several performance-profiles, with either a bias towards low-pow= er > > consumption (and cool and quiet) or towards performance (and higher pow= er > > consumption and thermals). > > Introduce a new performance_profile class/sysfs API which offers a gene= ric > > API for selecting the performance-profile of these automatic-mechanisms= . > > If introducing an API for this - let me ask the question, why even let ea= ch > driver offer a class interface and userspace need to change "each" driver= 's > performance setting? > > I would think that you could just offer something kernel-wide like > /sys/power/performance-profile > > Userspace can read and write to a single file. All drivers can get notifi= ed > on this sysfs file changing. > That makes sense, in my opinion, from the regular user's perspective: one switch to rule them all, no fuss. However, I don't think that scales we= ll. What if the hypothetical users wants to run a CPU-heavy workload, and thus = wants to put the GPU into "low-power" mode and the CPU into "performance" mode? W= hat if the users wants to put one GPU into "low-power" mode, but the other one int= o "performance"? With the current specification, the user's needs could be ea= sily satisfied. I don't see how that's possible with a single switch. Nonetheles= s, I think that a single global switch *in addition* to the class devices could possib= ly simplify the userspace-kernel interaction for most users. > The systems that react in firmware (such as the two that prompted > this discussion) can change at that time. It leaves the possibility for a > more open kernel implementation that can do the same thing though too by > directly modifying device registers instead of ACPI devices. > Excuse my ignorance, but I don't really see why this interface would be tie= d to ACPI devices? Why is it not possible to write a driver that implements this= interface and directly modifies device registers? Am I missing something obvious here= ? > [...] Thanks, Barnab=C3=A1s P=C5=91cze