From: Saravana Kannan <skannan@codeaurora.org>
To: markgross@thegnar.org
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
"Rafael J. Wysocki" <rjw@sisk.pl>,
James Bottomley <james.bottomley@suse.de>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jonathan Corbet <corbet@lwn.net>,
khilman@deeprootsystems.com
Subject: Re: [PATCH] pm_qos: Add system bus performance parameter
Date: Fri, 27 Aug 2010 19:55:37 -0700 [thread overview]
Message-ID: <4C787AA9.4090906@codeaurora.org> (raw)
In-Reply-To: <20100828020540.GB8341@gvim.org>
mark gross wrote:
> On Fri, Aug 27, 2010 at 01:10:55AM -0700, skannan@codeaurora.org wrote:
>> Ignoring other details for now, the biggest problem with throughput/KBps
>> units is that PM QoS can't handle it well in its current state. For KBps
>> the requests should be added together before it's "enforced". Just picking
>> the maximum won't work optimally.
>
> well then current pm_qos code for network throughput takes the max.
I don't know how the network throughput is enforced, but if the unit is
KBps and it's just doing a Max, then I think it's broken. If two clients
request 50 KBps and your network can go till 200 KBps, you would still
be requesting 50 KBps when you could have requested 100 KBps.
Any specific reason PM QoS doesn't support a "summation" "comparitor"?
>> Another problem with using KBps is that the available throughput is going
>> to vary depending on the CPU frequency since the CPU running at a higher
>> freq is going to use more bandwidth/throughput than the same CPU running
>> at a lower freq.
>
> um, if your modem SPI needs a min freq its really saying it needs a min
> throughput (throughput is just a scaler times freq, and 8KBS is a 13 bit
> shift away from HZ for SPI)
I think my point wasn't clear. Say the driver is doing mem read/write
and it needs 10 MBps and the system bus maxes out at 20 MBps.
When the CPU is idling, and isn't using the system bus, it would be
sufficient for the system bus to run at 10MBps speeds. But when CPU
starts executing at full speed, it's going to eat up some bandwidth and
the system bus will have to operate at 15 or 20 MBps speeds.
>> A KHz unit will side step both problems. It's not the most ideal in theory
>> but it's simple and gets the job done since, in our case, there aren't
>> very many fine grained levels of system bus frequencies (and corresponding
>> throughputs).
>
> I think your getting too wrapped up with this Hz thing and need write a
> couple of shift macros to convert between Kbs and Hz and be happy.
Yes, I could just do this and call it a day. Although, in my opinon,
it's a misrepresentation of the parameter since we aren't doing a
summation of the requests.
>> I understand that other architectures might have different practical
>> constraints and abilities and I didn't want to impose the KHz limitation
>> on them. That's the reason I proposed a parameter whose units is defined
>> by the "enforcer".
>
> The problem is that doing this will result in too many one-off drivers
> that don't port nicely to my architecture when I use the same
> peripheral as you.
Most of the drivers/devices that really need PM QoS and don't degrade
gracefully are internal to SoCs. I can't think of too many external or
loosely coupled devices that don't degrade gracefully. Anyway,
theoritically, your point is valid.
>> Thoughts?
>>
> not really anything additional, other than I wonder why kbs isn't
> working for you. Perhaps I'm missing something subtle.
I don't think that PM QoS in it's current state can meet all the real
requirements of bus bandwidth configuration or management. Which is fine
-- we need to start somewhere. Something like what Kevin mentions or a
different method would be needed to get this right for the complex
cases. I too would be very eager to join this discussion in one of the
conferences (Linux Plumbers?).
My thought was that till that's ready (this has been in discussion for
_at least_ 8 months) we could go with a PM QoS parameter (preferably
without units) and switch to the new design when it's available. I would
be more than glad to switch to the new/future design when it's available.
Did I convince you to allow a unit less parameter? :-)
-Saravana
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2010-08-28 2:55 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-27 4:13 Add system bus performance parameter Saravana Kannan
2010-08-27 4:13 ` [PATCH] pm_qos: " Saravana Kannan
2010-08-27 6:41 ` mark gross
2010-08-27 8:10 ` skannan
2010-08-27 10:17 ` Peter Zijlstra
2010-08-28 2:05 ` mark gross
2010-08-28 2:55 ` Saravana Kannan [this message]
2010-08-28 22:52 ` mark gross
2010-08-30 18:56 ` Kevin Hilman
2010-08-31 18:40 ` mark gross
2010-08-31 22:38 ` Saravana Kannan
2010-09-01 14:28 ` mark gross
2010-09-02 3:37 ` Saravana Kannan
2010-09-02 14:09 ` mark gross
2010-09-04 2:04 ` Saravana Kannan
2010-09-17 20:32 ` Saravana Kannan
2010-08-27 14:31 ` Kevin Hilman
2010-08-27 18:33 ` Bryan Huntsman
2010-08-28 1:55 ` mark gross
2010-08-28 2:09 ` mark gross
2010-08-28 23:05 ` mark gross
2010-09-02 14:05 ` mark gross
2010-09-02 20:09 ` Rafael J. Wysocki
2010-09-07 5:42 ` mark gross
2010-09-07 21:43 ` Rafael J. Wysocki
2010-08-27 4:19 ` Saravana Kannan
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=4C787AA9.4090906@codeaurora.org \
--to=skannan@codeaurora.org \
--cc=corbet@lwn.net \
--cc=fweisbec@gmail.com \
--cc=james.bottomley@suse.de \
--cc=khilman@deeprootsystems.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@thegnar.org \
--cc=rjw@sisk.pl \
/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).