linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH RFC] iwlwifi: add basic runtime PM support
       [not found] <4F065F59.2070107@intel.com>
@ 2012-01-06  9:47 ` Johannes Berg
  2012-01-09  1:01   ` Yan, Zheng
  0 siblings, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2012-01-06  9:47 UTC (permalink / raw)
  To: Yan, Zheng; +Cc: wey-yi.w.guy, ilw, netdev@vger.kernel.org, linux-wireless

[add linux-wireless]

On Fri, 2012-01-06 at 10:41 +0800, Yan, Zheng wrote:
> This simple patch adds open/close based runtime PM support to the iwlwifi driver.
> Namely, make the driver suspend the device after shutting down the interface and
> resume the device when activating the interface. In my test, suspending the device
> can save about 0.4 watt power. The shortcoming is that the device no longer generate
> rfkill changes interrupt.

NACK due to that last sentence. There's no way we can live with that in
the general case -- and your patch isn't even configurable afaict. And
I'm sure polling the rfkill flag would use just as much energy.

There might be some value in this in a system that doesn't have a hard
rfkill line, but that means this needs to be configurable since the
device can't know whether there's a button or not [1].

johannes

[1] actually in theory it might be possible to determine whether or not
the pin is floating or not? I doubt even that is possible with the HW we
have though


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH RFC] iwlwifi: add basic runtime PM support
  2012-01-09  1:01   ` Yan, Zheng
@ 2012-01-09  0:34     ` Guy, Wey-Yi
  2012-01-09  1:55       ` Yan, Zheng
  2012-01-09  9:10     ` Johannes Berg
  1 sibling, 1 reply; 9+ messages in thread
From: Guy, Wey-Yi @ 2012-01-09  0:34 UTC (permalink / raw)
  To: Yan, Zheng; +Cc: Johannes Berg, ilw, netdev@vger.kernel.org, linux-wireless

On Mon, 2012-01-09 at 09:01 +0800, Yan, Zheng wrote:
> On 01/06/2012 05:47 PM, Johannes Berg wrote:
> > [add linux-wireless]
> > 
> > On Fri, 2012-01-06 at 10:41 +0800, Yan, Zheng wrote:
> >> This simple patch adds open/close based runtime PM support to the iwlwifi driver.
> >> Namely, make the driver suspend the device after shutting down the interface and
> >> resume the device when activating the interface. In my test, suspending the device
> >> can save about 0.4 watt power. The shortcoming is that the device no longer generate
> >> rfkill changes interrupt.
> > 
> > NACK due to that last sentence. There's no way we can live with that in
> > the general case -- and your patch isn't even configurable afaict. And
> > I'm sure polling the rfkill flag would use just as much energy.
> > 
> It's configurable, runtime PM is disabled by default.

Somehow I miss it, how you configure it?

> 
> > There might be some value in this in a system that doesn't have a hard
> > rfkill line, but that means this needs to be configurable since the
> > device can't know whether there's a button or not [1].
> > 
> The patch targets system that only use software rfkill

How you control that?

Wey
> 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH RFC] iwlwifi: add basic runtime PM support
  2012-01-06  9:47 ` [PATCH RFC] iwlwifi: add basic runtime PM support Johannes Berg
@ 2012-01-09  1:01   ` Yan, Zheng
  2012-01-09  0:34     ` Guy, Wey-Yi
  2012-01-09  9:10     ` Johannes Berg
  0 siblings, 2 replies; 9+ messages in thread
From: Yan, Zheng @ 2012-01-09  1:01 UTC (permalink / raw)
  To: Johannes Berg; +Cc: wey-yi.w.guy, ilw, netdev@vger.kernel.org, linux-wireless

On 01/06/2012 05:47 PM, Johannes Berg wrote:
> [add linux-wireless]
> 
> On Fri, 2012-01-06 at 10:41 +0800, Yan, Zheng wrote:
>> This simple patch adds open/close based runtime PM support to the iwlwifi driver.
>> Namely, make the driver suspend the device after shutting down the interface and
>> resume the device when activating the interface. In my test, suspending the device
>> can save about 0.4 watt power. The shortcoming is that the device no longer generate
>> rfkill changes interrupt.
> 
> NACK due to that last sentence. There's no way we can live with that in
> the general case -- and your patch isn't even configurable afaict. And
> I'm sure polling the rfkill flag would use just as much energy.
> 
It's configurable, runtime PM is disabled by default.

> There might be some value in this in a system that doesn't have a hard
> rfkill line, but that means this needs to be configurable since the
> device can't know whether there's a button or not [1].
> 
The patch targets system that only use software rfkill

Regards
Yan, Zheng


> johannes
> 
> [1] actually in theory it might be possible to determine whether or not
> the pin is floating or not? I doubt even that is possible with the HW we
> have though
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH RFC] iwlwifi: add basic runtime PM support
  2012-01-09  1:55       ` Yan, Zheng
@ 2012-01-09  1:05         ` Guy, Wey-Yi
  2012-01-09  9:04           ` Yan, Zheng
  2012-01-09  9:11           ` Johannes Berg
  0 siblings, 2 replies; 9+ messages in thread
From: Guy, Wey-Yi @ 2012-01-09  1:05 UTC (permalink / raw)
  To: Yan, Zheng; +Cc: Johannes Berg, ilw, netdev@vger.kernel.org, linux-wireless

On Mon, 2012-01-09 at 09:55 +0800, Yan, Zheng wrote:
> On 01/09/2012 08:34 AM, Guy, Wey-Yi wrote:
> > On Mon, 2012-01-09 at 09:01 +0800, Yan, Zheng wrote:
> >> On 01/06/2012 05:47 PM, Johannes Berg wrote:
> >>> [add linux-wireless]
> >>>
> >>> On Fri, 2012-01-06 at 10:41 +0800, Yan, Zheng wrote:
> >>>> This simple patch adds open/close based runtime PM support to the iwlwifi driver.
> >>>> Namely, make the driver suspend the device after shutting down the interface and
> >>>> resume the device when activating the interface. In my test, suspending the device
> >>>> can save about 0.4 watt power. The shortcoming is that the device no longer generate
> >>>> rfkill changes interrupt.
> >>>
> >>> NACK due to that last sentence. There's no way we can live with that in
> >>> the general case -- and your patch isn't even configurable afaict. And
> >>> I'm sure polling the rfkill flag would use just as much energy.
> >>>
> >> It's configurable, runtime PM is disabled by default.
> > 
> > Somehow I miss it, how you configure it?
> > 
> change the value of /sys/devices/.../power/control to auto to enable the runtime PM.
> (e.g echo auto > /sys/devices/pci0000:00/0000:00:1c.3/0000:02:00.0/power/control)

I am not sure it is acceptable, how you expect user figure out the pci
space especially the NIC can be in any of the PCI slots.

> 
> >>
> >>> There might be some value in this in a system that doesn't have a hard
> >>> rfkill line, but that means this needs to be configurable since the
> >>> device can't know whether there's a button or not [1].
> >>>
> >> The patch targets system that only use software rfkill
> > 
> > How you control that?  
> I can't. Our team is working on runtime PM project, the purpose of the patch is
> more or less to demonstrate how much power can be saved.
> 
I understand, but unless we figure out either make rkill interrupt works
in runtime PM, or figure out the platform does not has HW RFKILL
automatically, I don't see how this patch can upstream without generate
a lot of issues and bug reports.

Thanks
Wey
> 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH RFC] iwlwifi: add basic runtime PM support
  2012-01-09  0:34     ` Guy, Wey-Yi
@ 2012-01-09  1:55       ` Yan, Zheng
  2012-01-09  1:05         ` Guy, Wey-Yi
  0 siblings, 1 reply; 9+ messages in thread
From: Yan, Zheng @ 2012-01-09  1:55 UTC (permalink / raw)
  To: Guy, Wey-Yi; +Cc: Johannes Berg, ilw, netdev@vger.kernel.org, linux-wireless

On 01/09/2012 08:34 AM, Guy, Wey-Yi wrote:
> On Mon, 2012-01-09 at 09:01 +0800, Yan, Zheng wrote:
>> On 01/06/2012 05:47 PM, Johannes Berg wrote:
>>> [add linux-wireless]
>>>
>>> On Fri, 2012-01-06 at 10:41 +0800, Yan, Zheng wrote:
>>>> This simple patch adds open/close based runtime PM support to the iwlwifi driver.
>>>> Namely, make the driver suspend the device after shutting down the interface and
>>>> resume the device when activating the interface. In my test, suspending the device
>>>> can save about 0.4 watt power. The shortcoming is that the device no longer generate
>>>> rfkill changes interrupt.
>>>
>>> NACK due to that last sentence. There's no way we can live with that in
>>> the general case -- and your patch isn't even configurable afaict. And
>>> I'm sure polling the rfkill flag would use just as much energy.
>>>
>> It's configurable, runtime PM is disabled by default.
> 
> Somehow I miss it, how you configure it?
> 
change the value of /sys/devices/.../power/control to auto to enable the runtime PM.
(e.g echo auto > /sys/devices/pci0000:00/0000:00:1c.3/0000:02:00.0/power/control)

>>
>>> There might be some value in this in a system that doesn't have a hard
>>> rfkill line, but that means this needs to be configurable since the
>>> device can't know whether there's a button or not [1].
>>>
>> The patch targets system that only use software rfkill
> 
> How you control that?  
I can't. Our team is working on runtime PM project, the purpose of the patch is
more or less to demonstrate how much power can be saved.

Regards
Yan, Zheng


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH RFC] iwlwifi: add basic runtime PM support
  2012-01-09  1:05         ` Guy, Wey-Yi
@ 2012-01-09  9:04           ` Yan, Zheng
  2012-01-09  9:11           ` Johannes Berg
  1 sibling, 0 replies; 9+ messages in thread
From: Yan, Zheng @ 2012-01-09  9:04 UTC (permalink / raw)
  To: Guy, Wey-Yi; +Cc: Johannes Berg, ilw, netdev@vger.kernel.org, linux-wireless

On 01/09/2012 09:05 AM, Guy, Wey-Yi wrote:
> On Mon, 2012-01-09 at 09:55 +0800, Yan, Zheng wrote:
>> On 01/09/2012 08:34 AM, Guy, Wey-Yi wrote:
>>> On Mon, 2012-01-09 at 09:01 +0800, Yan, Zheng wrote:
>>>> On 01/06/2012 05:47 PM, Johannes Berg wrote:
>>>>> [add linux-wireless]
>>>>>
>>>>> On Fri, 2012-01-06 at 10:41 +0800, Yan, Zheng wrote:
>>>>>> This simple patch adds open/close based runtime PM support to the iwlwifi driver.
>>>>>> Namely, make the driver suspend the device after shutting down the interface and
>>>>>> resume the device when activating the interface. In my test, suspending the device
>>>>>> can save about 0.4 watt power. The shortcoming is that the device no longer generate
>>>>>> rfkill changes interrupt.
>>>>>
>>>>> NACK due to that last sentence. There's no way we can live with that in
>>>>> the general case -- and your patch isn't even configurable afaict. And
>>>>> I'm sure polling the rfkill flag would use just as much energy.
>>>>>
>>>> It's configurable, runtime PM is disabled by default.
>>>
>>> Somehow I miss it, how you configure it?
>>>
>> change the value of /sys/devices/.../power/control to auto to enable the runtime PM.
>> (e.g echo auto > /sys/devices/pci0000:00/0000:00:1c.3/0000:02:00.0/power/control)
> 
> I am not sure it is acceptable, how you expect user figure out the pci
> space especially the NIC can be in any of the PCI slots.
> 
>>
>>>>
>>>>> There might be some value in this in a system that doesn't have a hard
>>>>> rfkill line, but that means this needs to be configurable since the
>>>>> device can't know whether there's a button or not [1].
>>>>>
>>>> The patch targets system that only use software rfkill
>>>
>>> How you control that?  
>> I can't. Our team is working on runtime PM project, the purpose of the patch is
>> more or less to demonstrate how much power can be saved.
>>
> I understand, but unless we figure out either make rkill interrupt works
> in runtime PM, or figure out the platform does not has HW RFKILL
> automatically, I don't see how this patch can upstream without generate
> a lot of issues and bug reports.
> 
Thank you for the suggestion.

Yan, Zheng


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH RFC] iwlwifi: add basic runtime PM support
  2012-01-09  1:01   ` Yan, Zheng
  2012-01-09  0:34     ` Guy, Wey-Yi
@ 2012-01-09  9:10     ` Johannes Berg
  1 sibling, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2012-01-09  9:10 UTC (permalink / raw)
  To: Yan, Zheng; +Cc: wey-yi.w.guy, ilw, netdev@vger.kernel.org, linux-wireless

On Mon, 2012-01-09 at 09:01 +0800, Yan, Zheng wrote:

> > NACK due to that last sentence. There's no way we can live with that in
> > the general case -- and your patch isn't even configurable afaict. And
> > I'm sure polling the rfkill flag would use just as much energy.
> > 
> It's configurable, runtime PM is disabled by default.

Oh ok, that's not so bad then -- we just need the default case to
continue working I think.

johannes


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH RFC] iwlwifi: add basic runtime PM support
  2012-01-09  1:05         ` Guy, Wey-Yi
  2012-01-09  9:04           ` Yan, Zheng
@ 2012-01-09  9:11           ` Johannes Berg
  2012-01-09 14:39             ` Guy, Wey-Yi
  1 sibling, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2012-01-09  9:11 UTC (permalink / raw)
  To: Guy, Wey-Yi; +Cc: Yan, Zheng, ilw, netdev@vger.kernel.org, linux-wireless

On Sun, 2012-01-08 at 17:05 -0800, Guy, Wey-Yi wrote:


> I understand, but unless we figure out either make rkill interrupt works
> in runtime PM, or figure out the platform does not has HW RFKILL
> automatically, I don't see how this patch can upstream without generate
> a lot of issues and bug reports.

I suppose the question is -- will any tools/users enable it and then
scream about their rfkill?

Maybe we can use pm_runtime_forbid() to disable it completely, and add a
module parameter or something to enable it -- just so people are aware
of the tradeoffs?

johannes


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH RFC] iwlwifi: add basic runtime PM support
  2012-01-09  9:11           ` Johannes Berg
@ 2012-01-09 14:39             ` Guy, Wey-Yi
  0 siblings, 0 replies; 9+ messages in thread
From: Guy, Wey-Yi @ 2012-01-09 14:39 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Yan, Zheng, ilw, netdev@vger.kernel.org, linux-wireless

On Mon, 2012-01-09 at 10:11 +0100, Johannes Berg wrote:
> On Sun, 2012-01-08 at 17:05 -0800, Guy, Wey-Yi wrote:
> 
> 
> > I understand, but unless we figure out either make rkill interrupt works
> > in runtime PM, or figure out the platform does not has HW RFKILL
> > automatically, I don't see how this patch can upstream without generate
> > a lot of issues and bug reports.
> 
> I suppose the question is -- will any tools/users enable it and then
> scream about their rfkill?
> 
> Maybe we can use pm_runtime_forbid() to disable it completely, and add a
> module parameter or something to enable it -- just so people are aware
> of the tradeoffs?

module parameter shall works, we just need a clear and easy way to allow
user enable/disable this runtime PM feature and not making mistake

Wey
> 



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-01-09 15:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4F065F59.2070107@intel.com>
2012-01-06  9:47 ` [PATCH RFC] iwlwifi: add basic runtime PM support Johannes Berg
2012-01-09  1:01   ` Yan, Zheng
2012-01-09  0:34     ` Guy, Wey-Yi
2012-01-09  1:55       ` Yan, Zheng
2012-01-09  1:05         ` Guy, Wey-Yi
2012-01-09  9:04           ` Yan, Zheng
2012-01-09  9:11           ` Johannes Berg
2012-01-09 14:39             ` Guy, Wey-Yi
2012-01-09  9:10     ` Johannes Berg

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).