From: Keith Busch <kbusch@kernel.org>
To: 廖煊 <liaoxuan@open-hieco.net>
Cc: axboe <axboe@kernel.dk>, hch <hch@lst.de>,
sagi <sagi@grimberg.me>,
linux-nvme <linux-nvme@lists.infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
default avatarZheng Tan <tanzheng@kylinos.cn>
Subject: Re: 回复:[PATCH 1/3] nvme: Add adaptive PCIe link rate switching function
Date: Thu, 5 Nov 2026 12:57:39 -0700 [thread overview]
Message-ID: <auzfs1qAOkXm8i2W@kbusch-mbp> (raw)
In-Reply-To: <34801e0a-5d66-47c4-9844-7844363072fe.liaoxuan@open-hieco.net>
On Thu, Nov 05, 2026 at 01:50:21PM +0800, 廖煊 wrote:
> However, L1 is entered only when the link is completely idle (no
> pending transactions). During active but low-utilization I/O, the link
> cannot enter L1 and typically stays trained at its maximum rate. This
> patch targets exactly that window: it dynamically downgrades the link
> rate to the minimum sufficient for the current traffic, and upgrades
> back to maximum when load rises.
ASPM operates on microsecond idle periods, so a lightly used link spends
most of its time detected as idle. Your threshold only selects the lower
rate below roughly 1.5MB/s on a Gen4 x4 link, which is essentially idle
where L1 would kick in more readily. Do you have shareable numbers that
show a real power benefit beyond ASPM?
> So the two mechanisms cover different link conditions and are
> complementary rather than conflicting: ASPM L1 handles the idle link,
> while this patch handles the active-but-underutilized link.
I don't think this kind of policy belongs in the kernel, much less in
the nvme driver. There are mechanisms for user space to control this,
though: the bwctrl cooling device lets user space set the link speed,
and diskstats provide utilization. A user space daemon can implement
this without kernel changes.
If you don't want to tie this to the PCIe thermal subsystem, maybe the
current_link_speed attribute could add a writeable callback instead?
prev parent reply other threads:[~2026-11-05 19:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1790134954.git.liaoxuan@open-hieco.net>
2026-11-03 6:25 ` [PATCH " Liao Xuan
2026-11-03 18:23 ` Bjorn Helgaas
2026-11-05 6:30 ` 回复:[PATCH " 廖煊
2026-11-05 19:22 ` Bjorn Helgaas
2026-11-06 3:39 ` 回复:回复:[PATCH " 廖煊
2026-11-03 19:08 ` [PATCH " Keith Busch
2026-11-05 5:50 ` 回复:[PATCH " 廖煊
2026-11-05 19:57 ` Keith Busch [this message]
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=auzfs1qAOkXm8i2W@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=liaoxuan@open-hieco.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
--cc=tanzheng@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®