linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <treding@nvidia.com>
To: Vidya Sagar <vidyas@nvidia.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Krishna Thota <kthota@nvidia.com>
Subject: Re: Query regarding ASPM in PCIe
Date: Thu, 5 Jun 2014 23:36:49 +0200	[thread overview]
Message-ID: <20140605213649.GA22251@ulmo.nvidia.com> (raw)
In-Reply-To: <113ACA888B71994BB56E5CF3704953486D6CE1E20E@BGMAIL02.nvidia.com>

[-- 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 --]

           reply	other threads:[~2014-06-05 21:39 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <113ACA888B71994BB56E5CF3704953486D6CE1E20E@BGMAIL02.nvidia.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140605213649.GA22251@ulmo.nvidia.com \
    --to=treding@nvidia.com \
    --cc=kthota@nvidia.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=vidyas@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).