Re: Query regarding ASPM in PCIe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Vidya,

when posting to public mailing lists it's customary to wrap your lines
at around 78 characters. Also can you convert the call graph pptx into
something more standard like PDF to make it easier for people to view?

Thierry

On Thu, Jun 05, 2014 at 03:57:23PM +0200, Vidya Sagar wrote:
> Hi,
> My understanding about ASPM feature is that, when CONFIG_PCIEASPM_POWERSAVE is enabled, PCI subsystem enables ASPM - L0s, L1 features based on latency calculations respectively.
> But in the latest code, though CONFIG_PCIEASPM_POWERSAVE is enabled, ASPM on eligible devices is not enabled.
> 
> irrespective of what CONFIG_PCIEASPM_* is (DEFAULT / POWERSAVE / PERFORMANCE), if 'echo powersave > /sys/modules/pcie_aspm/parameters/policy' is executed, ASPM states are enabled in all eligible devices and is working as well.
> 
> after having gone through the code, here is my understanding (I tried to depict the code flow in the attached PPT)
> pcie_config_aspm_link() is the API that actually enables link entry to L0s and L1 by writing the link control register in the configuration space of the devices.
> at top level, pci_enable_device() is the one that calls pcie_config_aspm_link() API which does the job ( ofcourse, pcie_aspm_set_policy() also calls it but only when the aforementioned sysfs entry is modified... and pcie_aspm_init_link_state() also calls.. again only if it is *not* in powersave mode ... for stability reasons...!)
> 
> the issue is surfacing here because.. in pci_set_power_state() there is this condition..
> 
> /* Check if we're already there */
> if (dev->current_state == state)
>     return 0;
> 
> because of which control returns from there and never comes to the end where the call pcie_aspm_powersave_config_link() is present.
> My understanding is that with the above condition, ASPM never gets enabled by default (unless we sysfs entry is explicitly written).
> Can you please confirm my understanding ? if this is the case indeed, I'll work on pushing a patch to fix this.
> 
> Thanks,
> Sagar
> 



-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

Attachment: pgp7T_J1z3EV5.pgp
Description: PGP signature


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux