From: Yaxiong Tian <iambestgod@qq.com>
To: Christoph Hellwig <hch@lst.de>
Cc: kbusch@kernel.org, axboe@kernel.dk, sagi@grimberg.me,
chaitanyak@nvidia.com, linux-nvme@lists.infradead.org,
linux-kernel@vger.kernel.org,
Yaxiong Tian <tianyaxiong@kylinos.cn>,
alexey.bogoslavsky@wdc.com
Subject: Re: [PATCH v3 0/3] nvme: Add sysfs interface for APST configuration management
Date: Thu, 3 Apr 2025 15:05:37 +0800 [thread overview]
Message-ID: <tencent_D00C9DD2BF00258063B042172328396DB608@qq.com> (raw)
In-Reply-To: <20250403042504.GB22360@lst.de>
在 2025/4/3 12:25, Christoph Hellwig 写道:
> On Tue, Apr 01, 2025 at 05:22:06PM +0800, Yaxiong Tian wrote:
>> From: Yaxiong Tian <tianyaxiong@kylinos.cn>
>>
>> This series enhances NVMe APST (Autonomous Power State Transition) support by:
>> 1. Adding warnings for PST table allocation failures
>
> That looks fine.
>
>> 2. Exposing APST tables via sysfs for runtime inspection
>> 3. Providing per-controller sysfs interface for APST configuration
>
> Who is going to use this and how? We'll need proper tools for that,
> and in general I'd prefer to have a common set of policies for APST
> configurations and not random people coming up with lots of random
> policies.
These two patches don't fundamentally change the APST configuration
policy, but rather enable users to configure various APST parameters in
real-time across different devices. As mentioned in commit
<ebd8a93aa4f5> ("nvme: extend and modify the APST configuration algorithm"):
1)This patch only introduces partial functionality from the Windows
driver - it doesn't enable dynamic regeneration of the APST table when
switching between AC power and battery power.
2) Additionally, using default configurations on certain brand SSDs has
been observed to increase power consumption.
Therefore, when a system contains multiple drives and users require
different configurations for AC vs battery power scenarios, real-time
APST configuration updates across different devices become necessary.It
must be said that configuring these parameters is difficult for average
users, but they can still use the original default settings. However,
for advanced users looking to optimize their devices, this provides them
with the necessary interface.
As for providing suitable tools for users, I suppose every advanced user
has their own preferences and approaches. For example, one could trace
device idle time statistics through trace events (e.g., nvme_complete_rq
→ nvme_setup_cmd) and use that data as a reference to configure
apst_primary_timeout_ms.
For example,The device idle time distribution under specific operating
conditions is shown below (unit: nanoseconds):
We can set apst_primary_timeout_ms to 32ms, which ensures that over 99%
of NVMe commands remain unaffected by APST.
@intervals:
[512, 1K) 749 |@@@@@@@@
|
[1K, 2K) 4856
|@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
[2K, 4K) 1002 |@@@@@@@@@@
|
[4K, 8K) 756 |@@@@@@@@
|
[8K, 16K) 413 |@@@@
|
[16K, 32K) 36 |
|
[32K, 64K) 14 |
|
[64K, 128K) 9 |
|
[128K, 256K) 13 |
|
[256K, 512K) 8 |
|
[512K, 1M) 4 |
|
[1M, 2M) 4 |
|
[2M, 4M) 3 |
|
[4M, 8M) 4 |
|
[8M, 16M) 3 |
|
[16M, 32M) 0 |
|
[32M, 64M) 6 |
|
[64M, 128M) 5 |
|
[128M, 256M) 5 |
|
[256M, 512M) 15 |
|
[512M, 1G) 7 |
|
next prev parent reply other threads:[~2025-04-03 7:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 9:22 Yaxiong Tian
2025-04-01 9:26 ` [PATCH v3 1/3] nvme: Add warning for PST table memory allocation failure in nvme_configure_apst Yaxiong Tian
2025-04-03 4:25 ` Christoph Hellwig
2025-04-03 7:08 ` Yaxiong Tian
2025-04-01 9:27 ` [PATCH v3 2/3] nvme: add sysfs interface for APST table updates Yaxiong Tian
2025-04-01 9:27 ` [PATCH v3 3/3] nvme: add per-controller sysfs interface for APST configuration Yaxiong Tian
2025-04-01 22:33 ` [PATCH v3 0/3] nvme: Add sysfs interface for APST configuration management Chaitanya Kulkarni
2025-04-03 4:25 ` Christoph Hellwig
2025-04-03 7:05 ` Yaxiong Tian [this message]
2025-04-04 8:29 ` Christoph Hellwig
2025-04-06 9:14 ` Alexey Bogoslavsky
2025-04-07 1:25 ` Yaxiong Tian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tencent_D00C9DD2BF00258063B042172328396DB608@qq.com \
--to=iambestgod@qq.com \
--cc=alexey.bogoslavsky@wdc.com \
--cc=axboe@kernel.dk \
--cc=chaitanyak@nvidia.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
--cc=tianyaxiong@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®