From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Lan Tianyu <tianyu.lan@intel.com>,
lenb@kernel.org, gregkh@linuxfoundation.org,
linux-acpi@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [RFC PATCH] usb/acpi: Add support usb port power off mechanism for device fixed on the motherboard
Date: Fri, 11 May 2012 11:12:56 -0700 [thread overview]
Message-ID: <20120511181256.GD18754@xanatos> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1205111302080.1865-100000@iolanthe.rowland.org>
On Fri, May 11, 2012 at 01:44:26PM -0400, Alan Stern wrote:
> On Sat, 12 May 2012, Lan Tianyu wrote:
>
> > The power saving depends on devices. I test a usb3.0 ssd. The power saving of
> > power off is about 2.2w more than just selective suspend. In theory, power
> > off can help to save remaining power after selective suspend.
>
> That's a lot of power! Suspended USB devices aren't supposed to
> consume more than 2.5 mA of bus current, which at 5 V amounts to <=
> 0.0125 W. Does the port really use that much? Or does the SSD have a
> separate power supply that it disables when port power is removed?
I actually suspect that the host controller is powering off several PLLs
if all the ports are powered off. After all, if it doesn't have to pay
attention to connects, disconnects, or remote wakeup, it can power off a
lot more circuitry, and possibly even enter D3cold instead of D3hot when
the PCI device is suspended (depending on what board Tianyu is testing
on). But I agree that it would be interesting to see if the SSD has a
separate power supply that it's turning off.
> > > The patch did not address the case of powering down ports that have no
> > > devices attached. That might be a better place to start, because it's
> > > simpler, even though it might not yield as much power savings.
> >
> > Do you mean internal ports?
>
> Internal or external.
>
> > From my opinion, ACPI will tell us whether the port is connectable or not.
>
> ACPI will tell you about some ports, not others (for example, ACPI
> knows nothing about the ports on hubs that the user plugs in). On
> other systems, a Device Tree database might provide the same
> information.
>
> > When the internal port is not connectable, this means the port is not used
> > and this patch will power down the port.
>
> ...
>
> > For external ports, this should be associated with sys file control. The users
> > need to determine when they should be power off.
>
> You don't mean "external", you mean "not described as unconnectable by
> ACPI".
>
> > So I should work on the external ports without devices firstly and
> > add the sys file for user to control?
>
> Yes, I think so. It will be less controversial and probably simpler.
> When that mechanism is ready, you should be able to use it
> automatically for unconnectable ports.
>
> One tricky thing: In theory, there should be a separate sysfs file for
> each port. That seems like a lot of overhead though; is there any way
> to present the information in a single file that won't offend sysfs
> purists?
Tianyu proposed having one file per hub, with a bit field that
controlled each port power. However, I was concerned about different
userspace applications racing with each other to turn or off ports. For
example, one app could read the bit field, attempt to power off just
port 1, but before it can write to the sysfs file, a second app powers
on port2, and the first app then writes to the sysfs file, leaving port
1 powered off, and port 2 powered off, which is not what the second app
wanted.
But if you can think of a better way to coalesce the port power off
mechanisms into one file, we're all ears. :)
Sarah Sharp
next prev parent reply other threads:[~2012-05-11 18:12 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-10 8:33 [RFC PATCH] usb/acpi: Add support usb port power off mechanism for device fixed on the motherboard Lan Tianyu
2012-05-10 15:54 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1205101136470.1831-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-05-10 16:35 ` Sarah Sharp
2012-05-10 17:44 ` Alan Stern
2012-05-11 16:12 ` Lan Tianyu
2012-05-11 16:16 ` Lan Tianyu
2012-05-11 17:44 ` Alan Stern
2012-05-11 18:12 ` Sarah Sharp [this message]
2012-05-12 12:47 ` Sergei Shtylyov
2012-05-12 14:04 ` Greg KH
2012-05-12 18:00 ` Lan Tianyu
2012-05-11 18:18 ` Lan Tianyu
[not found] ` <Pine.LNX.4.44L0.1205111302080.1865-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-05-11 18:35 ` Greg KH
2012-05-11 19:32 ` Alan Stern
2012-05-11 20:11 ` Sarah Sharp
2012-05-11 21:09 ` Peter Stuge
2012-05-15 1:47 ` Sarah Sharp
2012-05-15 4:57 ` Peter Stuge
2012-05-11 19:54 ` Lan, Tianyu
2012-05-11 20:15 ` Sarah Sharp
2012-05-11 20:26 ` Alan Stern
2012-05-11 20:20 ` Alan Stern
2012-05-12 17:47 ` Lan Tianyu
2012-05-12 18:04 ` Lan Tianyu
2012-05-13 2:50 ` Alan Stern
2012-05-10 19:19 ` Dan Williams
[not found] ` <1336677578.6463.5.camel-wKZy7rqYPVb5EHUCmHmTqw@public.gmane.org>
2012-05-10 21:11 ` Sarah Sharp
2012-05-11 4:13 ` Peter Stuge
2012-05-11 14:20 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1205111019000.1865-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-05-11 14:30 ` Peter Stuge
2012-05-11 14:08 ` Alan Stern
2012-05-11 18:03 ` Sarah Sharp
2012-05-11 19:14 ` Alan Stern
2012-05-11 20:21 ` Sarah Sharp
2012-05-11 20:36 ` Alan Stern
2012-05-11 23:59 ` Sarah Sharp
2012-05-12 0:17 ` Greg KH
2012-05-12 13:54 ` Alan Stern
2012-05-14 23:21 ` Sarah Sharp
2012-05-15 14:31 ` Lan Tianyu
[not found] ` <4FB268CA.9060304-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2012-05-15 15:18 ` Greg KH
2012-05-15 20:00 ` Sarah Sharp
2012-05-16 6:26 ` Lan Tianyu
2012-05-16 14:36 ` Alan Stern
2012-05-16 14:39 ` Greg KH
2012-05-16 14:54 ` Lan Tianyu
2012-05-16 15:08 ` Greg KH
2012-05-16 15:32 ` Lan Tianyu
[not found] ` <20120516150846.GB3293-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2012-05-16 15:57 ` Sarah Sharp
2012-05-16 15:12 ` Alan Stern
[not found] ` <20120516143958.GA612-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2012-05-17 11:42 ` Sergei Shtylyov
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=20120511181256.GD18754@xanatos \
--to=sarah.a.sharp@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=tianyu.lan@intel.com \
/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