From: Lukas Wunner <lukas@wunner.de>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
Bjorn Helgaas <helgaas@kernel.org>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI/sysfs: Protect driver's D3cold preference from user space
Date: Mon, 18 Sep 2023 16:26:37 +0200 [thread overview]
Message-ID: <20230918142637.GA28754@wunner.de> (raw)
In-Reply-To: <888824f7-06b5-4df4-ac04-c6cd599ff6f7@amd.com>
On Mon, Sep 18, 2023 at 08:28:51AM -0500, Mario Limonciello wrote:
> On 9/18/2023 08:24, Lukas Wunner wrote:
> > On Mon, Sep 18, 2023 at 08:14:21AM -0500, Mario Limonciello wrote:
> > > What's the history behind why userspace is allowed to opt a device out of
> > > D3cold in the first place?
> > >
> > > It feels like it should have been a debugging only thing to me.
> >
> > That's a fair question.
> >
> > Apparently the default for d3cold_allowed was originally "false"
> > and user space could opt in to D3cold. Then commit 4f9c1397e2e8
> > ("PCI/PM: Enable D3/D3cold by default for most devices") changed
> > the default to "true". That was 11 years ago.
> >
> > I agree that today this should all work automatically and a
> > user space option to disable D3cold on a per-device basis only
> > really makes sense as a debugging aid, hence belongs in debugfs.
> >
>
> Thanks. Then perhaps as part of moving it to debugfs it makes sense to
> simplify the logic.
d3cold_allowed is documented in Documentation/ABI/testing/sysfs-bus-pci,
so it's user space ABI which we're not allowed to break. We'd have to
declare it deprecated, emit a warning when it's used and slowly phase
it out over the years.
Until then, the $SUBJECT_PATCH probably still makes sense to reinstate
the behavior we had until 2016...
Thanks,
Lukas
next prev parent reply other threads:[~2023-09-18 17:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 12:48 [PATCH] PCI/sysfs: Protect driver's D3cold preference from user space Lukas Wunner
2023-09-18 13:07 ` Mika Westerberg
2023-09-18 13:14 ` Mario Limonciello
2023-09-18 13:24 ` Lukas Wunner
2023-09-18 13:28 ` Mario Limonciello
2023-09-18 14:26 ` Lukas Wunner [this message]
2023-09-18 14:52 ` Mario Limonciello
2023-09-28 22:36 ` Bjorn Helgaas
2023-09-29 4:44 ` Mika Westerberg
2023-09-29 19:03 ` Limonciello, Mario
2023-09-29 22:48 ` Bjorn Helgaas
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=20230918142637.GA28754@wunner.de \
--to=lukas@wunner.de \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mika.westerberg@linux.intel.com \
--cc=rjw@rjwysocki.net \
/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;
as well as URLs for NNTP newsgroup(s).