Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4644766rdb; Tue, 12 Dec 2023 05:44:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IGJIv9IKPkbrIAs+z0LCg1/Sr6EFGKx9uwRj9WVUZPLIL9y652HjJ1Q6TAA/Wl5Ps5+CI4j X-Received: by 2002:a92:cdaf:0:b0:35d:6497:3548 with SMTP id g15-20020a92cdaf000000b0035d64973548mr10024811ild.55.1702388648274; Tue, 12 Dec 2023 05:44:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702388648; cv=none; d=google.com; s=arc-20160816; b=CMtQb+UjjxmXwkoSHvPRxvzm2+1d9R8WO0rsNgYfGypubab8upX5ZL6QAhEXikGyAS qdXlBQdcYdYz2lBpKuAJo/bS8Apgakv20/BB4u7wYto6KAZqdZ47rfu+Yi8q5F1ro9Jl BVdDJUWm38c4Bqub22OAdZ75t2VUFziGbtGXD95j5DXV2k1BoirjEKPycPniADFzVDlL hFM3iz0Bej63JZ2XPOq9jgw5K6ZjsW22ROc2WiAF5SP7M3gsSykPQH3zc61THk+xentu 4TKqxR5Uur+L2oZpZRqGTeUxB1XIusoiMx5NAlJINKX3fCVX+MiWBUaSbmLDK3HtrlMr IXWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=LZUg4w46ACVomRrcA9eKhBaW2TuewHA+1DitxarBVhw=; fh=dJukztSS+APvLpN6QR1cNhy7RO46D45kkbc/OJdzGAk=; b=SI3ew6h1203y4/MoMpsTPvut+Zxhv5whHHSChVLHFbZUyl0uqyBkD5dDGholiL9c0x U7lfYyB3t/aNMATdHL21MNOOn5LdBjSGcei9YPcZMGzmYs6N22yq6XzZ8ua4IzRKPY1E xhOiQiupCHGDGA997h/SpEGXzbLRMpAPupj17DyH1g9W50JKqWE/elv5MHXtIdukFB5+ 3DDZs9UfPFmkc0nt+as3vUYmEPY6ONu6cXU2mIc0o7vbzgzhg/Gww5uuWfRWbKbzmmDR rtcCstQirHiPCRF1Bczz2QS5MKbqSGaPkQRyrmvh4tyOhYHYW04+TbWVDgeKOCdyhTwD 0pDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id y184-20020a638ac1000000b005c6c9524f93si7770327pgd.766.2023.12.12.05.44.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 05:44:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 90271805E018; Tue, 12 Dec 2023 05:44:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346612AbjLLNnt convert rfc822-to-8bit (ORCPT + 99 others); Tue, 12 Dec 2023 08:43:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346630AbjLLNnr (ORCPT ); Tue, 12 Dec 2023 08:43:47 -0500 Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6CAAFD; Tue, 12 Dec 2023 05:43:53 -0800 (PST) Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-590a21e977aso139156eaf.1; Tue, 12 Dec 2023 05:43:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702388633; x=1702993433; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9+kkVTreOL3w+OZGcOfK3FYPANHbgoXJuOH1K8tFH4g=; b=iigb1OZrH2QZ9p4i4fu9i9YQBUVcZHlB5z0g6vpa5kAGmppjJ/D3EVslvujVKVcpgq HzE7AXULnv2rQ6ELFzjdHW1lzspj3Ael8VzPB1ARA7nxzaxEr76SliB9SCVuqaOPw/Qv L5r6QGYhdxRVXbfL5FwTI+kZcOv1qTzXtdh9UQUIRnzhLyZMO8x1FT1DtseBxAtjbVp4 LPSPLsRYf9KAq/H4dUm2s3PcYTMbP0YqhEHESdl8vR4rHf8bNhWe0n67TrrMfUxwt5vy gadOxtpsrT8gBXVNccXvCfRVck7Q1Pc1SWUST/pTfG7zZLippDCZe4EuxU0LgA36cOaB t6nw== X-Gm-Message-State: AOJu0YzA4dT3h8N9PHw8q7Lro/KxOB04OD1Vjeds4KQsQOAkC9eIOoma pAa/HZMAo3jVGxXa55lxjmmQQqYVzB2xxs6jzE4= X-Received: by 2002:a4a:c487:0:b0:58d:ddcb:db1a with SMTP id f7-20020a4ac487000000b0058dddcbdb1amr10175400ooq.1.1702388633020; Tue, 12 Dec 2023 05:43:53 -0800 (PST) MIME-Version: 1.0 References: <20231205063537.872834-1-li.meng@amd.com> <20231205063537.872834-5-li.meng@amd.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Tue, 12 Dec 2023 14:43:42 +0100 Message-ID: Subject: Re: [PATCH V12 4/7] cpufreq: Add a notification message that the highest perf has changed To: Meng Li Cc: "Rafael J . Wysocki" , Huang Rui , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, linux-acpi@vger.kernel.org, Shuah Khan , linux-kselftest@vger.kernel.org, Nathan Fontenot , Deepak Sharma , Alex Deucher , Mario Limonciello , Shimmer Huang , Perry Yuan , Xiaojian Du , Viresh Kumar , Borislav Petkov , Oleksandr Natalenko Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 12 Dec 2023 05:44:05 -0800 (PST) On Wed, Dec 6, 2023 at 10:13 PM Rafael J. Wysocki wrote: > > On Wed, Dec 6, 2023 at 9:58 PM Rafael J. Wysocki wrote: > > > > On Tue, Dec 5, 2023 at 7:38 AM Meng Li wrote: > > > > > > ACPI 6.5 section 8.4.6.1.1.1 specifies that Notify event 0x85 can be > > > emmitted to cause the the OSPM to re-evaluate the highest performance > > > > Typos above. Given the number of iterations of this patch, this is > > kind of disappointing. > > > > > register. Add support for this event. > > > > Also it would be nice to describe how this is supposed to work at > > least roughly, so it is not necessary to reverse-engineer the patch to > > find out that. > > > > > Tested-by: Oleksandr Natalenko > > > Reviewed-by: Mario Limonciello > > > Reviewed-by: Huang Rui > > > Reviewed-by: Perry Yuan > > > Signed-off-by: Meng Li > > > Link: https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#processor-device-notification-values > > > --- > > > drivers/acpi/processor_driver.c | 6 ++++++ > > > drivers/cpufreq/cpufreq.c | 13 +++++++++++++ > > > include/linux/cpufreq.h | 5 +++++ > > > 3 files changed, 24 insertions(+) > > > > > > diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c > > > index 4bd16b3f0781..29b2fb68a35d 100644 > > > --- a/drivers/acpi/processor_driver.c > > > +++ b/drivers/acpi/processor_driver.c > > > @@ -27,6 +27,7 @@ > > > #define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80 > > > #define ACPI_PROCESSOR_NOTIFY_POWER 0x81 > > > #define ACPI_PROCESSOR_NOTIFY_THROTTLING 0x82 > > > +#define ACPI_PROCESSOR_NOTIFY_HIGEST_PERF_CHANGED 0x85 > > > > > > MODULE_AUTHOR("Paul Diefenbaugh"); > > > MODULE_DESCRIPTION("ACPI Processor Driver"); > > > @@ -83,6 +84,11 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) > > > acpi_bus_generate_netlink_event(device->pnp.device_class, > > > dev_name(&device->dev), event, 0); > > > break; > > > + case ACPI_PROCESSOR_NOTIFY_HIGEST_PERF_CHANGED: > > > + cpufreq_update_highest_perf(pr->id); > > > > And the design appears to be a bit ad-hoc here. > > > > Because why does it have anything to do with cpufreq? > > Well, clearly, cpufreq can be affected by this, but why would it be > not affected the same way as in the ACPI_PROCESSOR_NOTIFY_PERFORMANCE > case? > > That is, why isn't cpufreq_update_limits() the right thing to do? Seriously, I'm not going to apply this patch so long as my comments above are not addressed.