public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ai Li" <aili@codeaurora.org>
To: linux-pm@lists.linux-foundation.org
Subject: adding handles to pm_qos?
Date: Wed, 14 Oct 2009 11:24:19 -0600	[thread overview]
Message-ID: <000001ca4cf3$2a2da9c0$7e88fd40$@org> (raw)

We are calling pm_qos from some of our drivers.  One concern is that
each call of pm_qos_update_requirement() iterates through the client
list and strcmp the client names.  It could be slow.  A proposal is
that pm_qos provides handles that can be used on
pm_qos_update_requirement().

For measurement purposes, I added get/put interfaces to
acquire/release the handles and a new pm_qos_update_requirement
function that bypasses the iteration and strcmp.  Here are some
collected data:

How many clock cycles does pm_qos_update_requirement take?
when there is one client on this qos_class:
    using handle        using name      using handle/using name
avg 252.4               400.4           63%

when there are 5 clients on this qos_class:
    using handle        using name      using handle/using name
avg 407.6               644.8           63%

when there are 10 clients on this qos_class:
    using handle        using name      using handle/using name
avg 582.4               938.4           62%

Given the time differences, it seems worthwhile to add handles.

~Ai

             reply	other threads:[~2009-10-14 17:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-14 17:24 Ai Li [this message]
2009-10-23 22:53 ` adding handles to pm_qos? mgross
2009-10-28  0:37   ` Ai Li
2009-10-30 14:56     ` mgross
2009-10-31  1:53       ` Ai Li
2009-11-03 20:29         ` mgross
2009-11-18  1:06           ` Ai Li
2009-11-27 17:23             ` 640E9920

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='000001ca4cf3$2a2da9c0$7e88fd40$@org' \
    --to=aili@codeaurora.org \
    --cc=linux-pm@lists.linux-foundation.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