Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp296261rdb; Mon, 18 Sep 2023 15:48:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFCDr+5o4frH4HlaBa632bnB8kn6lBeZQoqkoqji5x+e6lhhfjBkUk5B0My5mDe27r2tT4X X-Received: by 2002:a17:90a:4b06:b0:26f:2c5a:bbb3 with SMTP id g6-20020a17090a4b0600b0026f2c5abbb3mr8628866pjh.40.1695077319305; Mon, 18 Sep 2023 15:48:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695077319; cv=none; d=google.com; s=arc-20160816; b=zRhLljbPdQ6N6ooQiy2zCD0grooYf2YcExifHS5888QiTWeM6P2N6aZWtFbMMVelwv /chDTL0Lt6t97GvILn9pETFhYcn9fSNWgXD57ZnhhvRNUIRaNt5uXt4JluKofSYh6C7A F7M6iAGbifpAExgyu0qcSpf03ktdYRbzVsYrV3JzesWzD4cp34fZ7+reRRuRgbNjdrzG D0kKsvdOt7FU8Tfwv8388m5Zd5g9YEVmc0R32Z++nplA9JBGGa9a5L/nab5PD7GItBOG aDt4O15gN3vQZ3mMwO3tkllrbTI1ODoBHRkUyCsO90F8f652F3sQhKFjRjZlFYfXHZ0o IzWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Kgfd/ILwg743YB1IZNWjnxQtieFj1a5XZRKCr5UccQE=; fh=Qua0Mip2MAb8FpoGxD9pGnp8VaxiRn5XrYfgVPMX5gU=; b=U3Ml+6akROdM/dpTT7NKY0XEJfyBdm119At/AyctupCzkSL4wNIWTps9CzJB0gvosm KfN62B/cMhNiNTcwmyv/Hy+lIHv+3rLj/NqOPzZV8X53BKJblnZhxwi2t0bGbDAsZXcc KFflvHS0SkOS6KYHtB1LsC9tgQ5auHGN3K4e+glo7XQVU7cYM73JkfXfxpNCH+1ClWPz 9iYRoSwomkh5nC6M0kAmKpgrwJMi65F5dlqNcqpaoGMT5Wc/Y+SLHnRJs6QL6qWbs68N rCDIxHy1WBJHkMNUZOdfz3K6ao2xu4qAZpVxpFNzNNgZ/Vj7nSiMkXoGWcwaD7l8Hpc3 A0aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=ie4K+Urc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id p8-20020a17090a0e4800b00263d00e1c54si8562053pja.54.2023.09.18.15.48.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 15:48:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=ie4K+Urc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 7A31680DBAC8; Mon, 18 Sep 2023 10:44:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229919AbjIRRoo (ORCPT + 99 others); Mon, 18 Sep 2023 13:44:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230262AbjIRRom (ORCPT ); Mon, 18 Sep 2023 13:44:42 -0400 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED400FB for ; Mon, 18 Sep 2023 10:44:36 -0700 (PDT) Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-34e1757fe8fso3542925ab.0 for ; Mon, 18 Sep 2023 10:44:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1695059076; x=1695663876; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Kgfd/ILwg743YB1IZNWjnxQtieFj1a5XZRKCr5UccQE=; b=ie4K+Urc1ptue5uCAUwHypQHoZyT93uGfcLNeOkgSg35ietgXbyxFDuw8XQ7k504Dj v6rf5G5AcfTefga1fHJdXYZukMcIWmVK+a7FYMJPoJ2xaGKAYRvLCyivcaWBQfVTtzXZ CvI/BfuMGHSOFq1XURY1E3rgscn3RM7h0y5nU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695059076; x=1695663876; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Kgfd/ILwg743YB1IZNWjnxQtieFj1a5XZRKCr5UccQE=; b=hDfJNU8udCwfVaf+KuXOrtsV/Ek1d4UPFRnJYEUel6Bm0+eElch1rvwWjlyqfAM+A8 LsUs7/O7LNUfqAicoRnlZsKq0Ui4MhRE9heq76i8xQxmFdAxasc5gCOR0iaX9DFrdMTS FOROR0r7HMmlWKXBjsn7aZYpbyGVhnqz+9P0b5J6FnLKq1mX0jLdfrFFMEqo3o6XJTIY qt2tiUzGF/X/Xu6KLobmqOJXGDuuszvgDMywKfhHeSo/UogsNPBEwUXY1yR5U5KqUt3m gtSAaWyBQSKmAK2lkhAL+VcztveQtSZhQTlJoGFwoDA4ViT51nbC+6gMGHkJzhglpB7r Xz5Q== X-Gm-Message-State: AOJu0YyB8YjuDkaNTdYI8aOxng8R+HxPF8/mtVqKcZGXu3UOwHEViCVN vvIaLzYOxJndbg178wlZEsFssw== X-Received: by 2002:a92:907:0:b0:34f:2e07:685b with SMTP id y7-20020a920907000000b0034f2e07685bmr10527191ilg.0.1695059076319; Mon, 18 Sep 2023 10:44:36 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id y5-20020a92d805000000b00348ab9bd829sm3145522ilm.53.2023.09.18.10.44.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Sep 2023 10:44:36 -0700 (PDT) Message-ID: <400a3e3e-4592-c947-a506-6baf1f268224@linuxfoundation.org> Date: Mon, 18 Sep 2023 11:44:35 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH V7 0/7] amd-pstate preferred core Content-Language: en-US To: Meng Li , "Rafael J . Wysocki" , Huang Rui Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, linux-acpi@vger.kernel.org, linux-kselftest@vger.kernel.org, Nathan Fontenot , Deepak Sharma , Alex Deucher , Mario Limonciello , Shimmer Huang , Perry Yuan , Xiaojian Du , Viresh Kumar , Borislav Petkov , Shuah Khan References: <20230918081407.756858-1-li.meng@amd.com> From: Shuah Khan In-Reply-To: <20230918081407.756858-1-li.meng@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 18 Sep 2023 10:44:57 -0700 (PDT) On 9/18/23 02:14, Meng Li wrote: > Hi all: > > The core frequency is subjected to the process variation in semiconductors. > Not all cores are able to reach the maximum frequency respecting the > infrastructure limits. Consequently, AMD has redefined the concept of > maximum frequency of a part. This means that a fraction of cores can reach > maximum frequency. To find the best process scheduling policy for a given > scenario, OS needs to know the core ordering informed by the platform through > highest performance capability register of the CPPC interface. > > Earlier implementations of amd-pstate preferred core only support a static > core ranking and targeted performance. Now it has the ability to dynamically > change the preferred core based on the workload and platform conditions and > accounting for thermals and aging. > > Amd-pstate driver utilizes the functions and data structures provided by > the ITMT architecture to enable the scheduler to favor scheduling on cores > which can be get a higher frequency with lower voltage. > We call it amd-pstate preferred core. > > Here sched_set_itmt_core_prio() is called to set priorities and > sched_set_itmt_support() is called to enable ITMT feature. > Amd-pstate driver uses the highest performance value to indicate > the priority of CPU. The higher value has a higher priority. > > Amd-pstate driver will provide an initial core ordering at boot time. > It relies on the CPPC interface to communicate the core ranking to the > operating system and scheduler to make sure that OS is choosing the cores > with highest performance firstly for scheduling the process. When amd-pstate > driver receives a message with the highest performance change, it will > update the core ranking. > > Changes form V6->V7: > - x86: > - - Modify kconfig about X86_AMD_PSTATE. > - cpufreq: amd-pstate: > - - modify incorrect comments about scheduler_work(). > - - convert highest_perf data type. > - - modify preferred core init when cpu init and online. > - acpi: cppc: > - - modify link of CPPC highest performance. > - cpufreq: > - - modify link of CPPC highest performance changed. > This series in now in linux-kselftest next branch for Linux 6.7-rc1. If there are any changes and/or fixes, please send patches on top of linux-kselftest next branch. thanks, -- Shuah