lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZcyZV2q1_QoK43vz@black.fi.intel.com>
Date: Wed, 14 Feb 2024 12:43:35 +0200
From: Raag Jadav <raag.jadav@...el.com>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: bhelgaas@...gle.com, jarkko.nikula@...ux.intel.com,
	mika.westerberg@...ux.intel.com, andriy.shevchenko@...ux.intel.com,
	stanislaw.gruszka@...ux.intel.com, lukas@...ner.de,
	rafael@...nel.org, ilpo.jarvinen@...ux.intel.com,
	linux-pci@...r.kernel.org, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
	sashal@...nel.org
Subject: Re: [PATCH v1] PCI / PM: Really allow runtime PM without callback
 functions

On Tue, Feb 13, 2024 at 02:06:48PM -0600, Bjorn Helgaas wrote:
> On Mon, Feb 12, 2024 at 12:02:33PM +0530, Raag Jadav wrote:
> > Commit c5eb1190074c ("PCI / PM: Allow runtime PM without callback
> > functions") tried to eliminate the need for runtime PM callbacks
> > by modifying pci_pm_runtime_suspend() and pci_pm_runtime_resume(),
> > but didn't modify pci_pm_runtime_idle() with relevant changes, which
> > still returns -ENOSYS if the driver supplies no runtime PM callbacks.
> > 
> > Fix this by modifying pci_pm_runtime_idle() such that it allows PCI
> > device power state transitions without runtime PM callbacks.
> > 
> >  0)               |  pm_runtime_work() {
> >  0)               |    rpm_idle() {
> >  0)               |      rpm_check_suspend_allowed() {
> >  0)   1.500 us    |        __dev_pm_qos_resume_latency(); /* = 0x7fffffff */
> >  0)   4.840 us    |      } /* rpm_check_suspend_allowed = 0x0 */
> >  0)   1.550 us    |      __rpm_get_callback(); /* = 0xffffffffb4bc84f0 */
> >  0)   1.800 us    |      pci_pm_runtime_idle(); /* = -38 */
> >  0) + 17.070 us   |    } /* rpm_idle = -38 */
> >  0) + 22.450 us   |  } /* pm_runtime_work = -38 */
> 
> What is this timing information telling me?

It's a raw ftrace dump.

> > Debugged-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
> 
> Sounds like this resolves a problem report?  Is there a URL we can
> cite?  If not, at least a mention of what the user-visible problem is?
> 
> From the c5eb1190074c commit log, it sounds like maybe this allows
> devices to be autosuspended when they previously could not be?
> 
> Possibly this should have "Fixes: c5eb1190074c ("PCI / PM: Allow
> runtime PM without callback functions")" since it sounds like it goes
> with it?

As pointed out by Jarkko, it's not a regression. The implementation
in original commit is incomplete. We discovered it while cleaning
up another PCI based driver.

> > Signed-off-by: Raag Jadav <raag.jadav@...el.com>
> > Tested-by: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> > Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@...ux.intel.com>
> > ---
> > 
> > This is not marked for linux-stable for the need of extensive testing
> > and can be backported after a few releases if no issues are reported.
> 
> If you think this should not get backported to stable, you'll have to
> watch the backports to prevent it.  Lots of stuff gets auto-backported
> even though not explicitly marked for stable.  This comment won't
> prevent it (and won't even appear in the commit log).

This is why I've added Greg and Sasha here.

Raag

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ