linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ulf.hansson@linaro.org (Ulf Hansson)
To: linux-arm-kernel@lists.infradead.org
Subject: PM regression with commit 5de85b9d57ab PM runtime re-init in v4.5-rc1
Date: Tue, 2 Feb 2016 21:24:41 +0100	[thread overview]
Message-ID: <CAPDyKFokWcLSCAh_TX-j-df_M1hN8Qw1gbQt--SyWccGCPiN5Q@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1602021112320.1653-100000@iolanthe.rowland.org>

[...]

>>
>> Your observations is correct. The hardware will be kept active
>> in-between the probe attempts (and thus also if probing fails).
>> Although, that's not a regression as that's the behaviour you get from
>> runtime PM, when drivers are implemented like omap_hsmmc.
>
> Perhaps this is what we should do.  If probing gets deferred a few
> times, doing runtime suspends and resumes in between will be a waste of
> time.

Then you will have to distinguish between -EPROBE_DEFER and other
errors, as I think leaving the device fully powered from a permanent
failed probe isn't very good.

Anyway, for sure it's doable by the driver, but let's try to focus on
the regression here for now.

>
>> Instead of the suggested approaches, I think the regression should be
>> fixed at the PM domain level (omap hwmod). I have attached a patch
>> below, please give it try as it's untested.
>>
>> To solve the other problem (allowing devices to become inactive
>> in-between at probe failures), I see two options (not treated as
>> regressions).
>> 1)
>> Change the behaviour of pm_runtime_put_sync(), to *not* respect the
>> autosuspend mode.
>> I think I prefer this option, as it seems like autosuspend should be
>> respected only via the asynchronous runtime PM APIs.
>
> ?  pm_runtime_put_sync() _already_ does not respect the autosuspend
> mode.  If you want to respect it, you have to call
> pm_runtime_put_sync_autosuspend() instead.

Then there's a bug in the runtime PM core.

>From Tony's regression report and from mine own local runtime PM test
driver, I can see that the device doesn't get RPM_SUSPENDED (the
->runtime_suspend() callback isn't called), even when the usage count
is zero - when pm_runtime_put_sync() is called.

To find the sequence of runtime PM commands, go ahead an have look in
the omap_hsmmc driver. The problem occurs when the driver bails out in
probe, when it receives -EPROBE_DEFER when fetching regulators.

I have some more data to share on this problem from my runtime PM test
driver. I will try my best to share it tomorrow.

>
>> 2)
>> Change the failing drivers, to before calling pm_runtime_put_sync()
>> also invoke pm_runtime_dont_use_autosusend(). Or other similar
>> approach.
>
> Given the above, this seems unnecessary.

Okay, so you are saying that the pm_runtime_put_sync() should idle the
device even if autosuspend is in use. That seems reasonable, I will
look into this problem.

Kind regards
Uffe

  parent reply	other threads:[~2016-02-02 20:24 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26 22:48 PM regression with commit 5de85b9d57ab PM runtime re-init in v4.5-rc1 Tony Lindgren
2016-01-26 22:50 ` Tony Lindgren
2016-01-26 23:14 ` Rafael J. Wysocki
2016-01-26 23:22   ` Tony Lindgren
2016-01-26 23:37     ` Rafael J. Wysocki
2016-01-26 23:52       ` Tony Lindgren
2016-01-27  7:54         ` Rafael J. Wysocki
2016-01-27  8:17           ` Ulf Hansson
2016-01-27 15:19             ` Tony Lindgren
2016-01-27 22:51             ` Rafael J. Wysocki
2016-01-28 14:29         ` Ulf Hansson
2016-01-28 16:58           ` Tony Lindgren
2016-02-01 16:44             ` Ulf Hansson
2016-02-01 18:11               ` Tony Lindgren
2016-02-01 22:06                 ` Tony Lindgren
2016-02-01 22:17                   ` Rafael J. Wysocki
2016-02-01 22:29                     ` Tony Lindgren
2016-02-01 23:10                       ` Rafael J. Wysocki
2016-02-01 23:28                         ` Tony Lindgren
2016-02-01 23:44                           ` Tony Lindgren
2016-02-01 23:49                           ` Alan Stern
2016-02-02  3:05                             ` Tony Lindgren
2016-02-02 10:07                               ` Ulf Hansson
2016-02-02 10:42                                 ` Ulf Hansson
2016-02-02 16:23                                   ` Alan Stern
2016-02-02 16:35                                   ` Tony Lindgren
2016-02-02 20:47                                     ` Ulf Hansson
2016-02-02 23:41                                       ` Tony Lindgren
2016-02-03 10:23                                         ` Ulf Hansson
2016-02-03 10:25                                           ` Ulf Hansson
2016-02-03 12:18                                             ` Rafael J. Wysocki
2016-02-03 14:58                                               ` Ulf Hansson
2016-02-03 15:45                                                 ` Alan Stern
2016-02-03 16:09                                                   ` Tony Lindgren
2016-02-03 16:24                                                     ` Ulf Hansson
2016-02-03 17:01                                                       ` Tony Lindgren
2016-02-03 17:16                                                       ` Rafael J. Wysocki
2016-02-03 16:27                                           ` Tony Lindgren
2016-02-03 18:02                                             ` Ulf Hansson
2016-02-03 18:28                                               ` Tony Lindgren
2016-02-03 18:37                                                 ` Ulf Hansson
2016-02-03 18:45                                                   ` Tony Lindgren
2016-02-03 21:51                                                     ` Tony Lindgren
2016-02-02 16:15                                 ` Alan Stern
2016-02-02 16:49                                   ` Tony Lindgren
2016-02-02 18:05                                     ` Tony Lindgren
2016-02-02 18:43                                       ` Alan Stern
2016-02-02 18:54                                         ` Tony Lindgren
2016-02-02 19:16                                           ` Alan Stern
2016-02-02 21:03                                             ` Tony Lindgren
2016-02-02 21:45                                               ` Alan Stern
2016-02-02 23:46                                                 ` Tony Lindgren
2016-02-03 13:06                                                   ` Rafael J. Wysocki
2016-02-03 16:36                                                     ` Tony Lindgren
2016-02-03 15:48                                                   ` Alan Stern
2016-02-03 16:37                                                     ` Tony Lindgren
2016-02-03 17:18                                                   ` Rafael J. Wysocki
2016-02-03 17:22                                                     ` Tony Lindgren
2016-02-03 17:27                                                       ` Rafael J. Wysocki
2016-02-04 10:20                                                     ` Ulf Hansson
2016-02-04 16:04                                                       ` Alan Stern
2016-02-04 17:20                                                         ` Tony Lindgren
2016-02-04 21:11                                                         ` Ulf Hansson
2016-02-04 22:09                                                           ` Alan Stern
2016-02-04 22:34                                                             ` Ulf Hansson
2016-02-05  1:08                                                               ` Tony Lindgren
2016-02-05  6:54                                                                 ` Ulf Hansson
2016-02-05 19:10                                                                   ` Tony Lindgren
2016-02-02 18:47                                       ` Tony Lindgren
2016-02-02 20:24                                   ` Ulf Hansson [this message]
2016-02-02 21:24                                     ` Alan Stern
2016-02-02 21:39                                     ` Tony Lindgren
2016-02-03 13:03                                       ` Rafael J. Wysocki
2016-02-03 16:49                                         ` Tony Lindgren

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=CAPDyKFokWcLSCAh_TX-j-df_M1hN8Qw1gbQt--SyWccGCPiN5Q@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).