From: Oliver Neukum <oneukum@suse.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
Micky Ching <micky_ching@realsil.com.cn>,
Wei WANG <wei_wang@realsil.com.cn>,
Roger Tseng <rogerable@realtek.com>,
Ritesh Raj Sarraf <rrs@researchut.com>,
linux-mmc <linux-mmc@vger.kernel.org>,
USB list <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] mmc: rtsx_usb_sdmmc: Handle runtime PM while changing led
Date: Thu, 22 Sep 2016 15:24:16 +0200 [thread overview]
Message-ID: <1474550656.11364.32.camel@suse.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1609211031420.1996-100000@iolanthe.rowland.org>
On Wed, 2016-09-21 at 10:35 -0400, Alan Stern wrote:
> On Wed, 21 Sep 2016, Oliver Neukum wrote:
> > Yes, but this is not the point. A heuristic with a timeout makes
> > sense only if the uses are unpredictable. If you know with a high
> > degree of probability when the next activity comes, you ought to either
> > suspend now or not all until the next activity.
> >
> > Likewise the heuristic is appropriate for leaf nodes. You get nothing
> > from a delay on inner nodes.
>
> Almost true, but not quite. When an inner node has more than one leaf
> beneath it, enabling an autosuspend delay for the inner node can make
> sense -- particularly if the leaf activities are uncorrelated.
Well, it is true that an inner node is likelier to be woken up
depending on the number of children. That is a reason to have a longer
timeout for an inner node. But it should start when the first node goes
idle. It makes no sense to start yet another timeout when the last node
goes idle.
In terms of mathematics I think we would need to multiply the timeout
with the square root of busy children and restart it whenever a child
goes to idle.
But it seems to me that this is impractical.
So I would suggest that we are missing an API for drivers to tell the
core that they become idle for a known period of time and to propagate
that immediately up if that is the last leaf to become idle.
> > Any storage (generic sense) device
> > is an inner node. It should suspend immediately after the block
> > device which is the leaf node.
>
> Yes. In this case, however, the USB device has two platform devices
> beneath it: one for SDMMC and one for MemoryStick cards.
Indeed, we can hope that the power efficient work queue used will
join the polling of both devices. Ideally we could model the mutual
exclusion.
Regards
Oliver
next prev parent reply other threads:[~2016-09-22 13:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-17 10:14 [PATCH] mmc: rtsx_usb_sdmmc: Handle runtime PM while changing led Ulf Hansson
[not found] ` <1474107278-3271-1-git-send-email-ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-09-18 2:30 ` Alan Stern
2016-09-19 9:24 ` Ulf Hansson
[not found] ` <CAPDyKFpFObRkvUC5kOKznE3FAGL6H_Hufa7ZEFWpmB694AY9ow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-19 18:02 ` Alan Stern
2016-09-20 9:34 ` Ulf Hansson
[not found] ` <CAPDyKFq2Y1vn1OjNJJg7hocbzFo-QUpezLSMWnF_1cSJ9Ot3NQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-20 14:09 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1609200951500.1459-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2016-09-21 10:39 ` Ulf Hansson
[not found] ` <CAPDyKFqgfhsOdrz5ncTh5Z_OZ6tvnMVoQ_2g7ZyM02aaVzGQWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-21 14:45 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1609211038270.1996-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2016-09-22 10:13 ` Ulf Hansson
[not found] ` <CAPDyKFozTL9h3HXoimHc4X3jeWQtJaedrfExVq1A5g7-JzcNLg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-22 13:56 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1609191348440.1458-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2016-09-20 9:40 ` Oliver Neukum
2016-09-20 14:12 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1609201009470.1459-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2016-09-21 9:50 ` Oliver Neukum
[not found] ` <1474451450.2675.13.camel-IBi9RG/b67k@public.gmane.org>
2016-09-21 14:35 ` Alan Stern
2016-09-22 13:24 ` Oliver Neukum [this message]
[not found] ` <1474550656.11364.32.camel-IBi9RG/b67k@public.gmane.org>
2016-09-22 14:00 ` Alan Stern
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=1474550656.11364.32.camel@suse.com \
--to=oneukum@suse.com \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=micky_ching@realsil.com.cn \
--cc=rogerable@realtek.com \
--cc=rrs@researchut.com \
--cc=stern@rowland.harvard.edu \
--cc=ulf.hansson@linaro.org \
--cc=wei_wang@realsil.com.cn \
/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