Linux Power Management development
 help / color / mirror / Atom feed
From: Sravan <asravan@codeaurora.org>
To: linux-pm@vger.kernel.org
Subject: avoid adding devices without pm_ops to dpm list
Date: Mon, 21 Apr 2014 17:37:06 +0530	[thread overview]
Message-ID: <535509EA.2090006@codeaurora.org> (raw)

Hello,

I have come across below code which looks can be optimized to reduce 
suspend/resume latencies.

During device registration at boot up, device_add() is called.
In this device_add() function, device_pm_add() is called without 
checking if the device has pm_ops or not.
Thus dpm_list is generated with all devices even if some devices don't 
have pm_ops.

device_add() -> device_pm_add()-> generate dpm_list

During suspend/resume process, suspend/resume APIs are called for 
devices present in dpm_list.
due to this, suspend/resume APIs for devices without pm_ops also called 
and just return with NULL.

Can we optimize this code by adding *ONLY* devices with pm_ops to 
dpm_list and ignore remaining?
It will help reduce suspend/resume latencies. I observed 10mS savings 
with my debug code. It may change based on number of devices without pm_ops.

Let me know your opinion/suggestions on this.

---
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

             reply	other threads:[~2014-04-21 12:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-21 12:07 Sravan [this message]
2014-04-21 14:09 ` avoid adding devices without pm_ops to dpm list Alan Stern
2014-05-04  5:57   ` Sravan
2014-05-04 15:52     ` Alan Stern

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=535509EA.2090006@codeaurora.org \
    --to=asravan@codeaurora.org \
    --cc=linux-pm@vger.kernel.org \
    /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