2010-06-22 10:44:28

by Sedat Dilek

[permalink] [raw]
Subject: ASPM status for iwlwifi and power-management (in general)

Hi,

yesterday, I was playing with PowerTop and my iwl3945 still is in the
TOP 3 of energy user.

Inspired by the recently published ASPM doc from Luis [2] I played a
bit with ASPM.

Currently, I am using a 2.6.35-rc3 Linux-kernel with latest
acpi-2.6/release fixes.

# dmesg | grep -i aspm
[ 0.226963] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe
device. You can enable it with 'pcie_aspm=force'
[ 0.227629] pci 0000:08:00.0: disabling ASPM on pre-1.1 PCIe
device. You can enable it with 'pcie_aspm=force'
[ 0.228205] pci 0000:10:00.0: disabling ASPM on pre-1.1 PCIe
device. You can enable it with 'pcie_aspm=force'

# for i in 01:00.0 08:00.0 10:00.0 ; do lspci -v | grep $i ; done
01:00.0 VGA compatible controller: ATI Technologies Inc M52 [Mobility
Radeon X1300] (prog-if 00 [VGA controller])
08:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5753M
Gigabit Ethernet PCI Express (rev 21)
10:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG
[Golan] Network Connection (rev 02)

# lspci -vvvv -s 10:00.0 | grep -i aspm
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0
<128ns, L1 <64us
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+

Before I will try 'pcie_aspm=force' cheat-code I wanted to ask about
the status of iwlwifi and ASPM.
Is there code available. yet? Which kernel has it - linux-next,
wireless-testing GIT, iwlwifi GIT?
Which user-space apps are required?
IIRC iw [3] from GIT has already "iw: add set/get power_save commands" [4].
Anyone tested ASPM with iwlwifi hardware? Experiences?

Beyond ASPM code, what is the actual status on power-mangement for
wifi-hardware in general?
IIRC it was turned off by default (with 2.6.33?)?

Thanks for any help in advance.


Kind Regards,
- Sedat -


[1] http://wireless.kernel.org/en/users/Documentation/ASPM
[2] http://marc.info/?l=linux-wireless&m=127716115227206&w=2
[3] http://git.sipsolutions.net/?p=iw.git
[4] http://git.sipsolutions.net/?p=iw.git;a=commit;h=cf40ef379fd6c74a01092d1dfdd936385ea402b0


Attachments:
iwl3945_ASPM.txt (2.14 kB)

2010-06-22 17:12:29

by Reinette Chatre

[permalink] [raw]
Subject: Re: ASPM status for iwlwifi and power-management (in general)

On Tue, 2010-06-22 at 03:44 -0700, Sedat Dilek wrote:

> Before I will try 'pcie_aspm=force' cheat-code I wanted to ask about
> the status of iwlwifi and ASPM.
> Is there code available. yet? Which kernel has it - linux-next,
> wireless-testing GIT, iwlwifi GIT?

iwl3945 will disable L0s if L1 enabled, and enable L0s if L1 disabled.
Please see iwl_apm_init which is called by iwl3945_apm_init

Reinette



2010-06-22 11:11:18

by Sedat Dilek

[permalink] [raw]
Subject: Re: ASPM status for iwlwifi and power-management (in general)

Attached iwl3945_ASPM-enabled_full.txt

- Sedat -

On Tue, Jun 22, 2010 at 1:09 PM, Sedat Dilek <[email protected]> wrote:
> I booted now with 'pcie_aspm=force':
>
> # dmesg | grep -i aspm
> [    0.000000] Kernel command line:
> BOOT_IMAGE=/boot/vmlinuz-2.6.35-rc3-iniza-686-kms
> root=UUID=b1333729-42ce-4a1b-9669-41c14c42bb81 ro nomodeset 3
> pcie_aspm=force
> [    0.000000] PCIe ASPM is forcedly enabled
>
> # lspci -vvvv -s 10:00.0 | grep -i aspm
>                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0
> <128ns, L1 <64us
>                LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
>
> Full dmesg and lspci for iwl3945 outputs are attached.
>
> - Sedat -
>
> On Tue, Jun 22, 2010 at 12:44 PM, Sedat Dilek
> <[email protected]> wrote:
>> Hi,
>>
>> yesterday, I was playing with PowerTop and my iwl3945 still is in the
>> TOP 3 of energy user.
>>
>> Inspired by the recently published ASPM doc from Luis [2] I played a
>> bit with ASPM.
>>
>> Currently, I am using a 2.6.35-rc3 Linux-kernel with latest
>> acpi-2.6/release fixes.
>>
>> # dmesg | grep -i aspm
>> [    0.226963] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe
>> device.  You can enable it with 'pcie_aspm=force'
>> [    0.227629] pci 0000:08:00.0: disabling ASPM on pre-1.1 PCIe
>> device.  You can enable it with 'pcie_aspm=force'
>> [    0.228205] pci 0000:10:00.0: disabling ASPM on pre-1.1 PCIe
>> device.  You can enable it with 'pcie_aspm=force'
>>
>> # for i in 01:00.0 08:00.0 10:00.0 ; do lspci -v | grep $i ; done
>> 01:00.0 VGA compatible controller: ATI Technologies Inc M52 [Mobility
>> Radeon X1300] (prog-if 00 [VGA controller])
>> 08:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5753M
>> Gigabit Ethernet PCI Express (rev 21)
>> 10:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG
>> [Golan] Network Connection (rev 02)
>>
>> # lspci -vvvv -s 10:00.0 | grep -i aspm
>>                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0
>> <128ns, L1 <64us
>>                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>>
>> Before I will try 'pcie_aspm=force' cheat-code I wanted to ask about
>> the status of iwlwifi and ASPM.
>> Is there code available. yet? Which kernel has it - linux-next,
>> wireless-testing GIT, iwlwifi GIT?
>> Which user-space apps are required?
>> IIRC iw [3] from GIT has already "iw: add set/get power_save commands" [4].
>> Anyone tested ASPM with iwlwifi hardware? Experiences?
>>
>> Beyond ASPM code, what is the actual status on power-mangement for
>> wifi-hardware in general?
>> IIRC it was turned off by default (with 2.6.33?)?
>>
>> Thanks for any help in advance.
>>
>>
>> Kind Regards,
>> - Sedat -
>>
>>
>> [1] http://wireless.kernel.org/en/users/Documentation/ASPM
>> [2] http://marc.info/?l=linux-wireless&m=127716115227206&w=2
>> [3] http://git.sipsolutions.net/?p=iw.git
>> [4] http://git.sipsolutions.net/?p=iw.git;a=commit;h=cf40ef379fd6c74a01092d1dfdd936385ea402b0
>>
>


Attachments:
iwl3945_ASPM-enabled_full.txt (2.14 kB)

2010-06-22 11:09:37

by Sedat Dilek

[permalink] [raw]
Subject: Re: ASPM status for iwlwifi and power-management (in general)

I booted now with 'pcie_aspm=force':

# dmesg | grep -i aspm
[ 0.000000] Kernel command line:
BOOT_IMAGE=/boot/vmlinuz-2.6.35-rc3-iniza-686-kms
root=UUID=b1333729-42ce-4a1b-9669-41c14c42bb81 ro nomodeset 3
pcie_aspm=force
[ 0.000000] PCIe ASPM is forcedly enabled

# lspci -vvvv -s 10:00.0 | grep -i aspm
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0
<128ns, L1 <64us
LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+

Full dmesg and lspci for iwl3945 outputs are attached.

- Sedat -

On Tue, Jun 22, 2010 at 12:44 PM, Sedat Dilek
<[email protected]> wrote:
> Hi,
>
> yesterday, I was playing with PowerTop and my iwl3945 still is in the
> TOP 3 of energy user.
>
> Inspired by the recently published ASPM doc from Luis [2] I played a
> bit with ASPM.
>
> Currently, I am using a 2.6.35-rc3 Linux-kernel with latest
> acpi-2.6/release fixes.
>
> # dmesg | grep -i aspm
> [    0.226963] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe
> device.  You can enable it with 'pcie_aspm=force'
> [    0.227629] pci 0000:08:00.0: disabling ASPM on pre-1.1 PCIe
> device.  You can enable it with 'pcie_aspm=force'
> [    0.228205] pci 0000:10:00.0: disabling ASPM on pre-1.1 PCIe
> device.  You can enable it with 'pcie_aspm=force'
>
> # for i in 01:00.0 08:00.0 10:00.0 ; do lspci -v | grep $i ; done
> 01:00.0 VGA compatible controller: ATI Technologies Inc M52 [Mobility
> Radeon X1300] (prog-if 00 [VGA controller])
> 08:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5753M
> Gigabit Ethernet PCI Express (rev 21)
> 10:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG
> [Golan] Network Connection (rev 02)
>
> # lspci -vvvv -s 10:00.0 | grep -i aspm
>                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0
> <128ns, L1 <64us
>                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>
> Before I will try 'pcie_aspm=force' cheat-code I wanted to ask about
> the status of iwlwifi and ASPM.
> Is there code available. yet? Which kernel has it - linux-next,
> wireless-testing GIT, iwlwifi GIT?
> Which user-space apps are required?
> IIRC iw [3] from GIT has already "iw: add set/get power_save commands" [4].
> Anyone tested ASPM with iwlwifi hardware? Experiences?
>
> Beyond ASPM code, what is the actual status on power-mangement for
> wifi-hardware in general?
> IIRC it was turned off by default (with 2.6.33?)?
>
> Thanks for any help in advance.
>
>
> Kind Regards,
> - Sedat -
>
>
> [1] http://wireless.kernel.org/en/users/Documentation/ASPM
> [2] http://marc.info/?l=linux-wireless&m=127716115227206&w=2
> [3] http://git.sipsolutions.net/?p=iw.git
> [4] http://git.sipsolutions.net/?p=iw.git;a=commit;h=cf40ef379fd6c74a01092d1dfdd936385ea402b0
>


Attachments:
dmesg.txt (61.11 kB)
iwl3945_ASPM-enabled.txt (153.00 B)
Download all attachments

2010-06-22 15:54:26

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: ASPM status for iwlwifi and power-management (in general)

On Tue, Jun 22, 2010 at 3:44 AM, Sedat Dilek <[email protected]> wrote:
> Hi,
>
> yesterday, I was playing with PowerTop and my iwl3945 still is in the
> TOP 3 of energy user.
>
> Inspired by the recently published ASPM doc from Luis [2] I played a
> bit with ASPM.
>
> Currently, I am using a 2.6.35-rc3 Linux-kernel with latest
> acpi-2.6/release fixes.
>
> # dmesg | grep -i aspm
> [    0.226963] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe
> device.  You can enable it with 'pcie_aspm=force'
> [    0.227629] pci 0000:08:00.0: disabling ASPM on pre-1.1 PCIe
> device.  You can enable it with 'pcie_aspm=force'
> [    0.228205] pci 0000:10:00.0: disabling ASPM on pre-1.1 PCIe
> device.  You can enable it with 'pcie_aspm=force'
>
> # for i in 01:00.0 08:00.0 10:00.0 ; do lspci -v | grep $i ; done
> 01:00.0 VGA compatible controller: ATI Technologies Inc M52 [Mobility
> Radeon X1300] (prog-if 00 [VGA controller])
> 08:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5753M
> Gigabit Ethernet PCI Express (rev 21)
> 10:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG
> [Golan] Network Connection (rev 02)
>
> # lspci -vvvv -s 10:00.0 | grep -i aspm
>                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0
> <128ns, L1 <64us
>                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
>
> Before I will try 'pcie_aspm=force' cheat-code

I should note I discourage the usage of pcie_aspm=force, it will try
to enable ASPM for all devices which do have the capability, and this
means when you are enabling it you are not only testing ASPM on the
device you had in mind but *all* devices capable of it.

> I wanted to ask about
> the status of iwlwifi and ASPM.
> Is there code available. yet?

Driver code for ASPM only exists to help tweak it if for whatever
reason it does need tweaking. An example is ath9k which disables the
PLL when it uses ASPM to save power. iwlagn or iwl3945 might have
similar stuff, but not sure. Technically drivers should not need any
code for ASPM unless its driver specific tweaks.

> Which kernel has it - linux-next,
> wireless-testing GIT, iwlwifi GIT?

ASPM can be used so long as you just have a PCIE bus. If the driver
has ASPM tweaks that's a different thing.

> Which user-space apps are required?

None.

> IIRC iw [3] from GIT has already "iw: add set/get power_save commands" [4].

That's different. Read:

http://wireless.kernel.org/en/users/Documentation/Power-consumption

Luis

> Anyone tested ASPM with iwlwifi hardware? Experiences?
>
> Beyond ASPM code, what is the actual status on power-mangement for
> wifi-hardware in general?
> IIRC it was turned off by default (with 2.6.33?)?
>
> Thanks for any help in advance.
>
>
> Kind Regards,
> - Sedat -
>
>
> [1] http://wireless.kernel.org/en/users/Documentation/ASPM
> [2] http://marc.info/?l=linux-wireless&m=127716115227206&w=2
> [3] http://git.sipsolutions.net/?p=iw.git
> [4] http://git.sipsolutions.net/?p=iw.git;a=commit;h=cf40ef379fd6c74a01092d1dfdd936385ea402b0
>