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]
Date:   Sat, 7 Jul 2018 18:54:14 +0300
From:   Mika Westerberg <mika.westerberg@...ux.intel.com>
To:     Lukas Wunner <lukas@...ner.de>
Cc:     linux-kernel@...r.kernel.org,
        Andreas Noever <andreas.noever@...il.com>,
        Michael Jamet <michael.jamet@...el.com>,
        Yehezkel Bernat <YehezkelShB@...il.com>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Christian Kellner <christian@...lner.me>,
        Mario Limonciello <mario.limonciello@...l.com>
Subject: Re: [PATCH 5/5] thunderbolt: Add support for runtime PM

On Sat, Jul 07, 2018 at 04:43:48PM +0200, Lukas Wunner wrote:
> On Sat, Jul 07, 2018 at 05:25:53PM +0300, Mika Westerberg wrote:
> > On Sat, Jul 07, 2018 at 03:38:15PM +0200, Lukas Wunner wrote:
> > > You're setting pm_runtime_no_callbacks() on the domain.  A side effect of
> > > setting this flag is that whenever the domain's device is runtime resumed,
> > > it's parent (the NHI) is *not* runtime resumed, see this comment in
> > > rpm_resume():
> > > 
> > > 	/*
> > > 	 * See if we can skip waking up the parent.  This is safe only if
> > > 	 * power.no_callbacks is set, because otherwise we don't know whether
> > > 	 * the resume will actually succeed.
> > > 	 */
> > > 
> > > Above, you're runtime resuming the domain in boot_acl_show().  So if the
> > > NHI is runtime suspended while that sysfs attribute is accessed, it won't
> > > be runtime resumed.  Is that actually what you want?
> > 
> > No, it should be runtime resumed when domain is. Looking at the code in
> > question bit more deeper:
> [snip]
> > So skipping waking the parent can only happen if any of the following
> > conditions are true:
> > 
> >   - Parent has runtime PM disabled
> >   - Parent has ignore_children set
> >   - Parent is already resumed
> > 
> > As far I can tell there can't be situation you describe that the parent would
> > not be runtime resumed when the domain is.
> 
> Okay, missed that.
> 
> Then why aren't you using pm_runtime_no_callbacks() on switches as well?
> Wouldn't that obviate the need to declare those empty runtime PM callbacks?

Domain is a kind of object that does not have a real physical device. It
is just an abstraction of a Thunderbolt domain formed by the host
controller (NHI) and the connection manager.  Therefore we power manage
it with the parent device (NHI). This is pretty much the purpose of
pm_runtime_no_callbacks().

However, switches do have a real physical device that can be power
managed. Furthermore we may need to add switch specific power management
logic at some point.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ