From: Oliver Neukum <oneukum@suse.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "David S. Miller" <davem@davemloft.net>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
Woojung Huh <woojung.huh@microchip.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Guenter Roeck <linux@roeck-us.net>,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linux-usb@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM
Date: Mon, 21 Mar 2016 19:51:09 +0100 [thread overview]
Message-ID: <1458586269.9609.14.camel@suse.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1603211415380.1708-100000@iolanthe.rowland.org>
On Mon, 2016-03-21 at 14:24 -0400, Alan Stern wrote:
> On Mon, 21 Mar 2016, Oliver Neukum wrote:
>
> > On Mon, 2016-03-21 at 10:57 -0400, Alan Stern wrote:
> >
> > > One possible solution is to export a sysfs parameter to prevent
> > > statistics collection (or more generally, to change the interval at
> > > which it occurs).
> >
> > Surely, not performing a task can hardly be beaten in terms of power
> > consumption. That is not meant to be flippant, but I think these
> > issues are orthogonal. The question of how much to do doesn't
> > solve the question of doing efficiently what we do.
>
> In other words, what's the best way to collect the statistics without
> interfering with runtime PM, right?
Yes.
> If the device is suspended, presumably we know there's nothing to
> collect -- especially if we already collected the statistics at the
> time the device got suspended. Hence my suggestion to avoid querying
> the device while it is suspended.
That is perfectly alright if we just collect statistics.
As a generic mechanism it is bad. Think about the polling
for media detection.
> But this leaves open the issue that querying the device too often will
> prevent it from going into autosuspend. It seems to me that the best
> way to deal with this is to make sure that the autosuspend timeout is
> shorter than the interal between queries, not to make the querying
> conditional on !runtime_auto.
[..]
> > If we know when the next activity will come, why not pass this
> > information down?
We have an autosuspend timeout because we think that IO, if it will
come at all, is likeliest to come soon. If, however, the IO is
periodic that heuristics is false.
To save most power the driver must either decide that the interval
is too short or suspend immediately. So if we are lucky enough
to have the frequency in the kernel, we should use that information.
Regards
Oliver
next prev parent reply other threads:[~2016-03-21 18:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-20 10:43 [PATCH] lan78xx: Protect runtime_auto check by #ifdef CONFIG_PM Geert Uytterhoeven
2016-03-20 16:35 ` Eric Dumazet
2016-03-20 20:52 ` David Miller
2016-03-20 22:59 ` Guenter Roeck
2016-03-21 14:59 ` Woojung.Huh
2016-03-21 8:36 ` Oliver Neukum
[not found] ` <1458549361.2299.1.camel-IBi9RG/b67k@public.gmane.org>
2016-03-21 14:41 ` Woojung.Huh-UWL1GkI3JZL3oGB3hsPCZA
2016-03-21 14:57 ` Alan Stern
2016-03-21 17:34 ` Oliver Neukum
2016-03-21 18:24 ` Alan Stern
2016-03-21 18:42 ` Woojung.Huh
2016-03-21 19:27 ` Alan Stern
2016-03-21 20:09 ` Woojung.Huh
[not found] ` <9235D6609DB808459E95D78E17F2E43D404CC1EF-8fD0d2gESGrABDY0R+s2SH2Vsf1/G1/XQQ4Iyu8u01E@public.gmane.org>
2016-03-21 21:02 ` Alan Stern
2016-03-21 18:51 ` Oliver Neukum [this message]
2016-03-21 19:30 ` Alan Stern
2016-03-22 9:50 ` Oliver Neukum
[not found] ` <1458640209.1990.8.camel-IBi9RG/b67k@public.gmane.org>
2016-03-22 14:21 ` Alan Stern
2016-03-22 14:28 ` Oliver Neukum
2016-03-22 15:13 ` Alan Stern
2016-03-22 15:29 ` Oliver Neukum
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=1458586269.9609.14.camel@suse.com \
--to=oneukum@suse.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=davem@davemloft.net \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=netdev@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=stern@rowland.harvard.edu \
--cc=woojung.huh@microchip.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;
as well as URLs for NNTP newsgroup(s).