New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 733791 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

Disable USB persist feature for hubs

Project Member Reported by jwer...@chromium.org, Jun 15 2017

Issue description

USB persist is a sysfs-controlled per-device kernel feature that makes the kernel re-enumerate devices that lost their power session in S3 synchronously on resume and pretend to userspace that they never went away. This is useful for certain use cases (e.g. having a mass storage device mounted) which aren't particularly relevant to Chrome OS, but it comes with serious resume time penalties (because device enumeration takes hundreds of milliseconds). That's why we had always disabled it on Chrome OS.

However, hubs are hardcoded in the kernel to always use persist... presumably to make it easier for userspace to control (because having persist enabled on a device wouldn't help unless it is also enabled on all its parent devices). This means that when users have a hub plugged in (as may become increasingly common with the rise of Type-C) their resume time may regress by roughly 500ms (see issue 726508 for examples).

We should try to change the kernel to remove this restriction so that we can stop reenumerating hubs synchronously. This will probably take some amount of convincing upstream. Feedback from people like Alan Stern would also be very helpful to make sure we're getting it right and not overlooking any important aspect. Some important detail questions: should root hubs still have the persist flag set, or what happens if they don't? (Root hubs usually require much less time to reset and enumerate, although it's not zero.) Do we need to programmatically prevent userspace from enabling persist on a device unless all its parents have it, or would it just fail gracefully? Should we maybe transparently enable it on the parents in that case?
 

Comment 1 by derat@chromium.org, Jun 15 2017

Cc: mka@chromium.org derat@chromium.org

Comment 2 by tbroch@chromium.org, Aug 18 2017

Status: Available (was: Untriaged)
Labels: -Pri-1 -M-62 M-65 Pri-2
Is this on anyone's radar?

It seems like transparent enabling of 'persist' for parents is a reasonable feature. IIRC, this is already done for the 'wakeup' property, no? If we mark a child as wakeup-enabled in sysfs, then its parents do too? This feels like a pretty similar feature (how could a child persist if its parent doesn't?).

Comment 5 by tbroch@chromium.org, Jan 18 (4 days ago)

Labels: Pri-3
De-prioritizing to '3' given 'available' status & removing milestones accordingly.  If you disagree please mark 'untriaged'.

Comment 6 by tbroch@chromium.org, Jan 19 (4 days ago)

Labels: -M-65

Sign in to add a comment