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: <3fe5414a-570f-4bfa-aa2f-909d7799551b@rowland.harvard.edu>
Date:   Wed, 8 Nov 2023 10:56:19 -0500
From:   Alan Stern <stern@...land.harvard.edu>
To:     Guan-Yu Lin <guanyulin@...gle.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     gregkh@...uxfoundation.org, len.brown@...el.com, pavel@....cz,
        heikki.krogerus@...ux.intel.com, mkl@...gutronix.de,
        hadess@...ess.net, mailhol.vincent@...adoo.fr,
        ivan.orlov0322@...il.com, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        pumahsu@...gle.com, raychi@...gle.com, albertccwang@...gle.com
Subject: Re: [PATCH] rpm: pm: enable PM_RPM_EXCEPTION config flag

On Wed, Nov 08, 2023 at 04:45:43PM +0800, Guan-Yu Lin wrote:
> Thanks for the questions. Let me first introduce my motivation for
> proposing this feature. We can discuss the implementation details later.
> 
> Motivation:
> Currently, system PM operations always override runtime PM operations.
> As runtime PM reflects the power status of devices, there is a
> possibility that runtime PM states that a device is in use, but system
> PM decides to suspend it. Up to now, we have assumed that a device can't
> function without resources from the system, so the device should acquire
> a wakelock to prevent this from happening. However, what if the device

[From the fact that you mention wakelocks, I assume that you're trying 
to implement something for Android systems rather than Linux systems 
in general.]

> does not need the system's support to function? Or only needs limited
> resources (e.g., only limited power source or clock) to function? In this
> situation, we would like to keep the device on but allow the system to
> suspend. This is an example where we would like devices to follow runtime
> PM rather than system PM.

To put it more simply, you want a way to leave some devices in an active 
state while the rest of the system is suspended.  It's not clear why you 
have dragged runtime PM into the discussion (apart from the obvious fact 
that you won't want to keep a device active if it isn't active already).

This sounds like a major change, not something to be done with a simple 
override.  You should discuss it with Rafael Wysocki and the linux-pm 
mailing list before trying to implement anything.

> Feature Supported:
> 1. Devices could control the priority of system PM and runtime PM during
>    runtime.

This seems like a totally unnecessary side issue.  Forget about runtime 
PM for the time being and concentrate instead on which devices you want 
to keep active.

> 2. The control should be at the device level, meaning that different
>    devices should control their own priorities.
> 
> Goal of This Patch:
> 1. Design a framework to support features above.
> 2. Apply it into usb for demonstration.

You may find that it is easier (and less work in the long run) to design 
the general framework and get it working than to concentrate on one 
particular subsystem.

Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ