2010-03-17 04:49:32

by Stefan Monnier

[permalink] [raw]
Subject: iwl3945 and power saving

I finally upgraded from 2.6.30 to 2.6.33 (mostly for TRIM support) on my
laptop and find that power saving doesn't seem to work any more on its
iwl3945 card.

The extra power consumption is quite significant, so I'm considering
compiling my own driver, manually re-enabling the power-saving code.

But before I do that, I'd like to know what is the risk involved (it
seems pretty serious since it warranted removing the feature
altogether, even tho it was runtime-disabled by default anyway).


Stefan



2010-03-17 05:35:07

by Reinette Chatre

[permalink] [raw]
Subject: Re: iwl3945 and power saving

Stefan,

On Tue, 2010-03-16 at 21:49 -0700, Stefan Monnier wrote:

> The extra power consumption is quite significant, so I'm considering
> compiling my own driver, manually re-enabling the power-saving code.

You will need to revert "iwl3945: disable power save" and then also
enable power savings using "iwconfig wlanX power on"

>
> But before I do that, I'd like to know what is the risk involved (it
> seems pretty serious since it warranted removing the feature
> altogether, even tho it was runtime-disabled by default anyway).

You should find all the details in
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2125

Reinette



2010-03-19 16:48:17

by Reinette Chatre

[permalink] [raw]
Subject: Re: iwl3945 and power saving

On Wed, 2010-03-17 at 12:34 -0700, Stefan Monnier wrote:
> Hmm... it seems odd to completely kill the feature rather than to flag
> it as "beware, it's brittle" (e.g. only allow to turn it on with
> "iwconfig wlanX power on-and-I-promise-I-wont-report-a-bug-if-its-buggy").

I do not see a way to communicate this to users.

>
> Also, it puzzles me: my 3945 has been working fine with power-saving for
> more than 2 years (and earlier with ipw3945 as well) and I haven't
> noticed any unreliability. Have I just been lucky or did the problem
> only start to manifest in more "recent" versions of the driver, for
> reasons we don't understand?

The previous power saving implementation was very simple. Nothing was
directed from upper layers and user had to manually choose a power
index, which is communicated to device once and device remained in that
power saving state from then on. Recent advances in power saving meant
that more was asked from devices as they were asked to enter and exit
power saving frequently. This new behavior is what is causing issues in
3945 and 4965.

Reinette



2010-03-20 01:47:51

by Stefan Monnier

[permalink] [raw]
Subject: Re: iwl3945 and power saving

>> Hmm... it seems odd to completely kill the feature rather than to flag
>> it as "beware, it's brittle" (e.g. only allow to turn it on with
>> "iwconfig wlanX power on-and-I-promise-I-wont-report-a-bug-if-its-buggy").
> I do not see a way to communicate this to users.

No, indeed ;-)

> The previous power saving implementation was very simple. Nothing was
> directed from upper layers and user had to manually choose a power
> index, which is communicated to device once and device remained in
> that power saving state from then on. Recent advances in power saving
> meant that more was asked from devices as they were asked to enter and
> exit power saving frequently. This new behavior is what is causing
> issues in 3945 and 4965.

Aha! That's very interesting, then. So, given that the previous naive
power-saving implementation worked well for me (and I presume other
users as well), would it be possible to use/provide that old naive
technique for 3945 and 4965?

Or does the new technique change too much of the structure of the code
that the naive technique can't be used any more?
Could someone kindly point me to the most relevant commits that changed
the power management technique, if it all possible?

Would reverting "iwlwifi: unify iwlagn and 3945 power save management"
be a possible starting point (probably not for a patch that I intend to
submit back for inclusion, but I'm thinking more for a patch for my own
personal use, or more likely just to start trying to understand what's
going on)?


Stefan

2010-03-19 22:09:25

by Reinette Chatre

[permalink] [raw]
Subject: Re: iwl3945 and power saving

On Fri, 2010-03-19 at 14:41 -0700, Stefan Monnier wrote:
> Aha! That's very interesting, then. So, given that the previous naive
> power-saving implementation worked well for me (and I presume other
> users as well), would it be possible to use/provide that old naive
> technique for 3945 and 4965?

We could look into this. Could you please submit a request for this
change to http://bugzilla.intellinuxwireless.org/ ?


> Or does the new technique change too much of the structure of the code
> that the naive technique can't be used any more?
> Could someone kindly point me to the most relevant commits that changed
> the power management technique, if it all possible?

A lot has changed in this area in the last few kernel versions.

> Would reverting "iwlwifi: unify iwlagn and 3945 power save management"
> be a possible starting point (probably not for a patch that I intend to
> submit back for inclusion, but I'm thinking more for a patch for my own
> personal use, or more likely just to start trying to understand what's
> going on)?

If I remember correctly the patch you refer to only removed duplicated
code.

If there is a need for this then I think what can be done here is either
use the current debugfs "sleep_level_override" or maybe some new one to
get to the old behavior. Currently modifying this value will be ignored
if power saving is marked as broken, as is done for 3945. I wonder if we
can modify it such that user can change this setting even if power
saving is marked as broken. This is maybe something you can try out.

Reinette




2010-03-17 19:34:43

by Stefan Monnier

[permalink] [raw]
Subject: Re: iwl3945 and power saving

>> The extra power consumption is quite significant, so I'm considering
>> compiling my own driver, manually re-enabling the power-saving code.
> You will need to revert "iwl3945: disable power save" and then also
> enable power savings using "iwconfig wlanX power on"

Yes, thank you.

>> But before I do that, I'd like to know what is the risk involved (it
>> seems pretty serious since it warranted removing the feature
>> altogether, even tho it was runtime-disabled by default anyway).
> You should find all the details in
> http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2125

Hmm... it seems odd to completely kill the feature rather than to flag
it as "beware, it's brittle" (e.g. only allow to turn it on with
"iwconfig wlanX power on-and-I-promise-I-wont-report-a-bug-if-its-buggy").

Also, it puzzles me: my 3945 has been working fine with power-saving for
more than 2 years (and earlier with ipw3945 as well) and I haven't
noticed any unreliability. Have I just been lucky or did the problem
only start to manifest in more "recent" versions of the driver, for
reasons we don't understand?


Stefan


2010-03-20 18:52:07

by Stefan Monnier

[permalink] [raw]
Subject: Re: iwl3945 and power saving

>> Aha! That's very interesting, then. So, given that the previous naive
>> power-saving implementation worked well for me (and I presume other
>> users as well), would it be possible to use/provide that old naive
>> technique for 3945 and 4965?
> We could look into this. Could you please submit a request for this
> change to http://bugzilla.intellinuxwireless.org/ ?

Done.

> If there is a need for this then I think what can be done here is either
> use the current debugfs "sleep_level_override" or maybe some new one to
> get to the old behavior. Currently modifying this value will be ignored
> if power saving is marked as broken, as is done for 3945. I wonder if we
> can modify it such that user can change this setting even if power
> saving is marked as broken. This is maybe something you can try out.

Thanks, I'm going to take a look at it,


Stefan