Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp453047rdb; Mon, 29 Jan 2024 07:21:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjfs/WWr6ffsmVK5Bw0LX4uHYTDTFXd7+ssJ9whdE46Q2qODdjo9Ki1yP0bU65Wq+dCsQt X-Received: by 2002:ac8:5b84:0:b0:42a:9aa9:2d2c with SMTP id a4-20020ac85b84000000b0042a9aa92d2cmr4551447qta.64.1706541578645; Mon, 29 Jan 2024 07:19:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706541578; cv=pass; d=google.com; s=arc-20160816; b=ZbEN+zFbaJIYx7St9s0C9loZaWpXHdHzHxAozMgACIbzTLrPusaTACJGBQgkIWNR2L 8SwJrXA14o2B3UzXVgYYvVlogD1HZ3oZgT0+k2CNantNj3bpU9wkZyXn2cokqZNUjc04 nKn85hVEXmQJgDOVDhCIfdYtLQEGxmdAj9mAxMBAt/hG8CPVWNi2zh/j+VKnj/Pj6RAx AosxNdVD455pyfqDlu5+RF1gTIsvokXdICev/+DQo7zUq9SrL4PgBlfn/pFfK1gtc9j7 nf7Vh1qRrxx1xPK7QGRkUEUsVx7Mj1KL/n/dlLv87xQbUK/U5zcqL01Muy9d/UM0wkCY f0xA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=mbj/GubrUM5ol2t9pipY347bjtlgBP1tVcH6RRQE3wc=; fh=v6PH8h5NfJYDINaPEDVnPYKjG06U4HFB61bw0B3TfnE=; b=GslV7AWp9d9cz9SfSelDxBKt4LqmgLk/jUC9W+pJd5J+OQz7nTL3Yb1NzN0iYGPltQ FpZvXD6IbBw1+UB0z5uXWM/Lc49MI2ZfD9d+OX7FUaekHdS8QFzxdtMuMaupdv8AiF4r DmcpsYMqdqYcf5P0jPFnJpc7d8TYy95+fGVNPxjX3W26Zi/IcOyIKHvnemTp2KtKYfPe wSKLq1Z++iA+eX84RU4CyqfugWOaEWU5B7rjEe8jCoBYDB7EPHVzAvyV7D5DIjUvQbTd u2bYBYdyq8aRoomKTZC9EUIZ3bxEZYs2S2tjeaDRjHhmSoorItrX+7uOLrdzhZoK8wma DUzA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-42984-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42984-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g22-20020ac85d56000000b0042ab1da3bbcsi4408qtx.68.2024.01.29.07.19.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 07:19:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-42984-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-42984-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-42984-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 657B61C22E9F for ; Mon, 29 Jan 2024 15:19:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3443155A26; Mon, 29 Jan 2024 15:18:16 +0000 (UTC) Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BCAD153BC1; Mon, 29 Jan 2024 15:18:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706541496; cv=none; b=Gg9kVicy71HEIjl5yT45gk64Z71a+YCns4I9NIpdIlCnbUqfWg/lalYFE1kHQN1S2QcrQEsUIOPxmD1Rd7Q9devjH32dHj+HdN5lsEn2yyZOZsTy6aHMy9bev+8hyUXJIz+3vI3ZBVzKtfcfMt0YdcD1ajrXj1slSqoBXSEhJ0A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706541496; c=relaxed/simple; bh=mbj/GubrUM5ol2t9pipY347bjtlgBP1tVcH6RRQE3wc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=We5HOxRbh3NqqwOt2IVEO1qJDfa1veYVXGoI2olFQ4HCvhNltsDUYxl+460aa2ZGEqBPemQmVbFm8gndmqfIfnChOv+6/0yr8MekJNlbq/xCL0/fp35W8yoWA+hoF8fB+vySCll56//+cGjJ8w3aWUQDh6/Aqy+wgbqkq9iDmv8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.160.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-2148d3d7334so62345fac.1; Mon, 29 Jan 2024 07:18:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706541494; x=1707146294; 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=mbj/GubrUM5ol2t9pipY347bjtlgBP1tVcH6RRQE3wc=; b=N3r+DzYqf0KluXXRVYrFWxGv8GEArMqPYH6GK1YDw49OIvFbTagOuKI4h4i+L+okh7 BP2zrVCEZEe/LpWVn1LxxqGd5haYDvl+rjjKjOCDBWTax4+qvXhX5meJpNHGklTaJp/p dyKvRnbHDUMwCrlmH/WjjJy3wIaD1uc4TB6hl0t8zko7zpbYusLJTva0+bog8I1JDGsW TwZQ9MMbDZ2KJc4DQimHEbZzSct4qsMv7NJ1U+YO3L/StyVrXEq2wIvCHMINCqZRWkDT +JL/MJVP0v4LM8yiCs2exAhNJN1M6Bv7rYorZ1ZQ/EG5DsawIJqO74ze4+mzvbfFQheB 1K9w== X-Gm-Message-State: AOJu0YzQIYjIJR9JMqJyW0vLP4CX4/+DVXy0KuRypVkyEXzsiQ2kNlB7 F0dhUuoEi/+ni2tlJCVEUfkTKCpcMMVHyJg2Dr5CyqItpLRkBq7frc8mNmJuDQX1i83IPcIozV4 NnVVqQveXbfA4Py1XqJk3n4g2wJk= X-Received: by 2002:a05:6870:a927:b0:204:5ad3:e6ec with SMTP id eq39-20020a056870a92700b002045ad3e6ecmr7295673oab.4.1706541493935; Mon, 29 Jan 2024 07:18:13 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240119090502.3869695-1-li.meng@amd.com> In-Reply-To: <20240119090502.3869695-1-li.meng@amd.com> From: "Rafael J. Wysocki" Date: Mon, 29 Jan 2024 16:18:02 +0100 Message-ID: Subject: Re: [PATCH V14 0/7] amd-pstate preferred core To: Meng Li , Borislav Petkov 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: quoted-printable On Fri, Jan 19, 2024 at 10:05=E2=80=AFAM Meng Li wrote: > > Hi all: > > The core frequency is subjected to the process variation in semiconductor= s. > 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 reac= h > maximum frequency. To find the best process scheduling policy for a given > scenario, OS needs to know the core ordering informed by the platform thr= ough > highest performance capability register of the CPPC interface. > > Earlier implementations of amd-pstate preferred core only support a stati= c > core ranking and targeted performance. Now it has the ability to dynamica= lly > change the preferred core based on the workload and platform conditions a= nd > 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 core= s > 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-pst= ate > driver receives a message with the highest performance change, it will > update the core ranking. Hi Boris, You've had comments on the previous version of this. Have they all been addressed?