All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@stericsson.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Chris Ball <cjb@laptop.org>,
	"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>
Subject: Re: [PATCH/RFC] mmc: add a device PM QoS constraint when a host is
Date: Wed, 14 Dec 2011 11:12:29 +0000	[thread overview]
Message-ID: <4EE8849D.1010401@stericsson.com> (raw)
In-Reply-To: <201112141115.00945.rjw@sisk.pl>


>> You have a point. But I am not convinced. :-)
>>
>> Some host drivers already make use of autosuspend. I think this is most 
>> straightforward solution to this problem right now.
> 
> The problem is not about _when_ to suspend (which autosuspend is about),
> but _what_ _state_ to go when suspended.  That's quite a different issue.

I was kind of taking a more simple approach, I were considering 
runtime_suspend as _one_ state. Right now there is no host driver having 
different levels of runtime_suspend state, if I am correct. But ofcourse 
that could be the future.

Moreover, I definitely do not think that a fixed timeout of 100us is 
applicable for all use cases, this must at least be configurable.

> 
>> However, we could also do pm_runtime_get_sync of the host device in 
>> claim host and vice verse in release host, thus preventing the host 
>> driver from triggering runtime_suspend|resume for every request. Though, 
>> I am not 100% sure this is really what you want either.
> 
> No, I don't want that.  I want the device to be suspended when possible,
> but I don't want that to cause the system to go into an overly deep power
> state as a result.

Before just skipping my proposal, I think you should know some more 
background to why I suggested this:

1.
mmc_claim_host is using mmc_host_enable, which kind of mean the same 
thing for a host driver as doing get_sync. Vice verse for mmc_release_host.

2.
When executing mmc/sd commands/requests the host must always be claimed 
(and thus the host is always enabled). But more important some mmc/sd 
commands must be executed as a sequence, without the host being disabled 
in between the commands (since a disable might mean that the clock to 
card gets disabled). To solve this, the mmc_claim_host is used, to make 
sure the host is enabled during the complete command sequence.

I happily continue this discussion, to see if someone more can break the 
idea about having get_sync in mmc_host_enable. :-)

> 
>> Using PM QoS as you propose, might prevent some hosts from doing 
>> runtime_suspend|resume completely and thus those might not fulfill power 
>> consumption requirements instead.
> 
> I'm not sure what scenario you have in mind.  Care to elaborate?

Well, suppose a the host drivers start considering the PM QoS 
requirement, but never can fulfill the requirement of 100us for it's 
runtime_suspend callback function...

> 
>> I do not think we can take this decision at this level. Is performance more
>> important than power save, that is kind of the question.
> 
> Yes, it is.  Also, the number used here is somewhat arbitrary.

For you maybe power management is less important, but I doubt everybody 
else agree to that. It is a more complex balance I believe.

> 
> However, since no one except for SH7372 is now using device PM QoS, no one
> else will be affected by this change at the moment.

True, but that is not a good reason for adding more stuff to the mmc core.

> 
> Thanks,
> Rafael
> 

By the way, I like to discuss with you so please take no offense from my 
comments. :-)


BR
Ulf Hansson

WARNING: multiple messages have this Message-ID (diff)
From: Ulf Hansson <ulf.hansson@stericsson.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Chris Ball <cjb@laptop.org>,
	"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>
Subject: Re: [PATCH/RFC] mmc: add a device PM QoS constraint when a host is first claimed
Date: Wed, 14 Dec 2011 12:12:29 +0100	[thread overview]
Message-ID: <4EE8849D.1010401@stericsson.com> (raw)
In-Reply-To: <201112141115.00945.rjw@sisk.pl>


>> You have a point. But I am not convinced. :-)
>>
>> Some host drivers already make use of autosuspend. I think this is most 
>> straightforward solution to this problem right now.
> 
> The problem is not about _when_ to suspend (which autosuspend is about),
> but _what_ _state_ to go when suspended.  That's quite a different issue.

I was kind of taking a more simple approach, I were considering 
runtime_suspend as _one_ state. Right now there is no host driver having 
different levels of runtime_suspend state, if I am correct. But ofcourse 
that could be the future.

Moreover, I definitely do not think that a fixed timeout of 100us is 
applicable for all use cases, this must at least be configurable.

> 
>> However, we could also do pm_runtime_get_sync of the host device in 
>> claim host and vice verse in release host, thus preventing the host 
>> driver from triggering runtime_suspend|resume for every request. Though, 
>> I am not 100% sure this is really what you want either.
> 
> No, I don't want that.  I want the device to be suspended when possible,
> but I don't want that to cause the system to go into an overly deep power
> state as a result.

Before just skipping my proposal, I think you should know some more 
background to why I suggested this:

1.
mmc_claim_host is using mmc_host_enable, which kind of mean the same 
thing for a host driver as doing get_sync. Vice verse for mmc_release_host.

2.
When executing mmc/sd commands/requests the host must always be claimed 
(and thus the host is always enabled). But more important some mmc/sd 
commands must be executed as a sequence, without the host being disabled 
in between the commands (since a disable might mean that the clock to 
card gets disabled). To solve this, the mmc_claim_host is used, to make 
sure the host is enabled during the complete command sequence.

I happily continue this discussion, to see if someone more can break the 
idea about having get_sync in mmc_host_enable. :-)

> 
>> Using PM QoS as you propose, might prevent some hosts from doing 
>> runtime_suspend|resume completely and thus those might not fulfill power 
>> consumption requirements instead.
> 
> I'm not sure what scenario you have in mind.  Care to elaborate?

Well, suppose a the host drivers start considering the PM QoS 
requirement, but never can fulfill the requirement of 100us for it's 
runtime_suspend callback function...

> 
>> I do not think we can take this decision at this level. Is performance more
>> important than power save, that is kind of the question.
> 
> Yes, it is.  Also, the number used here is somewhat arbitrary.

For you maybe power management is less important, but I doubt everybody 
else agree to that. It is a more complex balance I believe.

> 
> However, since no one except for SH7372 is now using device PM QoS, no one
> else will be affected by this change at the moment.

True, but that is not a good reason for adding more stuff to the mmc core.

> 
> Thanks,
> Rafael
> 

By the way, I like to discuss with you so please take no offense from my 
comments. :-)


BR
Ulf Hansson

  reply	other threads:[~2011-12-14 11:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-12 15:46 [PATCH/RFC] mmc: add a device PM QoS constraint when a host is first Guennadi Liakhovetski
2011-12-12 15:46 ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is first claimed Guennadi Liakhovetski
2011-12-13 15:18 ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is Ulf Hansson
2011-12-13 15:18   ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is first claimed Ulf Hansson
2011-12-13 16:13   ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is Guennadi Liakhovetski
2011-12-13 16:13     ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is first claimed Guennadi Liakhovetski
2011-12-13 21:08     ` Rafael J. Wysocki
2011-12-13 21:08       ` Rafael J. Wysocki
2011-12-14  9:00     ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is Ulf Hansson
2011-12-14  9:00       ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is first claimed Ulf Hansson
2011-12-14  9:27       ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is Linus Walleij
2011-12-14  9:27         ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is first claimed Linus Walleij
2011-12-14 10:28         ` Rafael J. Wysocki
2011-12-14 10:28           ` Rafael J. Wysocki
2011-12-14 15:50           ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is Linus Walleij
2011-12-14 15:50             ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is first claimed Linus Walleij
2011-12-14 10:15       ` Rafael J. Wysocki
2011-12-14 10:15         ` Rafael J. Wysocki
2011-12-14 11:12         ` Ulf Hansson [this message]
2011-12-14 11:12           ` Ulf Hansson
2011-12-14 21:36           ` Rafael J. Wysocki
2011-12-14 21:36             ` Rafael J. Wysocki
2011-12-16  9:14             ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is Guennadi Liakhovetski
2011-12-16  9:14               ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is first claimed Guennadi Liakhovetski
2011-12-19 12:17               ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is Ulf Hansson
2011-12-19 12:17                 ` [PATCH/RFC] mmc: add a device PM QoS constraint when a host is first claimed Ulf Hansson
2012-03-03 20:53                 ` Rafael J. Wysocki
2012-03-03 20:53                   ` Rafael J. Wysocki

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=4EE8849D.1010401@stericsson.com \
    --to=ulf.hansson@stericsson.com \
    --cc=cjb@laptop.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.