linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Query regarding ASPM in PCIe
       [not found] <113ACA888B71994BB56E5CF3704953486D6CE1E20E@BGMAIL02.nvidia.com>
@ 2014-06-05 21:36 ` Thierry Reding
  0 siblings, 0 replies; only message in thread
From: Thierry Reding @ 2014-06-05 21:36 UTC (permalink / raw)
  To: Vidya Sagar; +Cc: linux-pci@vger.kernel.org, Krishna Thota

[-- Attachment #1: Type: text/plain, Size: 2562 bytes --]

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 #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-05 21:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <113ACA888B71994BB56E5CF3704953486D6CE1E20E@BGMAIL02.nvidia.com>
2014-06-05 21:36 ` Query regarding ASPM in PCIe Thierry Reding

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