From: "Prakash, Prashanth" <pprakash@codeaurora.org>
To: Alexey Klimov <alexey.klimov@arm.com>
Cc: linux-acpi@vger.kernel.org, rjw@rjwysocki.net,
ashwin.chaugule@linaro.org, hotran@apm.com
Subject: Re: [PATCH] ACPI/CPPC: Support for batching CPPC requests
Date: Fri, 27 May 2016 11:49:43 -0600 [thread overview]
Message-ID: <7d1abc8a-c6e0-9841-5c03-115efa2930c9@codeaurora.org> (raw)
In-Reply-To: <20160526220234.GA26524@arm.com>
On 5/26/2016 4:02 PM, Alexey Klimov wrote:
> On Tue, May 17, 2016 at 12:39 AM, Prashanth Prakash <pprakash@codeaurora.org> wrote:
>> CPPC defined in section 8.4.7 of ACPI 6.1 specification suggests
>> "To amortize the cost of PCC transactions, OSPM should read or write
>> all PCC registers via a single read or write command when possible"
>> This patch enables opportunistic batching of frequency transition
>> requests whenever the request happen to overlap in time.
>>
>> Currently the access to pcc is serialized by a spin lock which does
>> not scale well as we increase the number of cores in the system. This
>> patch improves the scalability by allowing the differnt CPU cores to
>> update PCC subspace in parallel and by batching requests which will
>> reduce certain types of operation(checking command completion bit,
>> ringing doorbell) by a significant margin.
>>
>> Profiling shows significant improvement in the time to service freq.
>> transition request. Using a workload which includes multiple iteration
>> of configure+make of vim (with -j24 option):
>> Without batching requests(without this patch),
>> 6 domains: Avg=20us/request; 24 domains: Avg=52us/request
>> With batching requests(with this patch),
>> 6 domains: Avg=16us/request; 24 domains: Avg=19us/request
>> domain: An individual cpu or a set of related CPUs whose frequency can
>> be scaled independently
> With this approach sometimes you will send POSTCHANGE notifications about
> frequency change for some random CPUs before actual request to change
> frequency was sent (and received?) through PCC channel.
> Depending on platform/firmware/configuration this time difference might be high.
>
> How vital or important is to have POSTCHANGE notification in correct time
> order?
Good catch. Yeah, we could end up notifying POSTCHANGE prior to ringing the doorbell.
I haven't thought about this a lot and not sure if there are clients that rely on the
accuracy of the notification.
Anyways, I suppose we can make cppc_set_perf return a value to indicate if a request
was delivered (i.e doorbell was rang) or batched (request updated, but doorbell will
be rung by a different CPU). Using this return value cppc_cpufreq_set_target can
notify all the pending CPUs at once or queue to be notified. Sounds reasonable?
Also, if we think about CPPC, since we don't have a way to know exactly when platform
did the frequency/voltage transition, I suppose POSTCHANGE will be a little out of
order :)
Thanks,
Prashanth
> Best regards,
> Alexey.
>
next prev parent reply other threads:[~2016-05-27 17:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-16 23:39 [PATCH] ACPI/CPPC: Support for batching CPPC requests Prashanth Prakash
2016-05-26 22:02 ` Alexey Klimov
2016-05-27 17:49 ` Prakash, Prashanth [this message]
2016-06-09 17:22 ` Hoan Tran
2016-06-09 22:46 ` Prakash, Prashanth
2016-06-10 2:25 ` Hoan Tran
2016-06-10 21:22 ` Prakash, Prashanth
2016-06-10 21:45 ` Hoan Tran
2016-06-28 15:53 ` Prakash, Prashanth
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=7d1abc8a-c6e0-9841-5c03-115efa2930c9@codeaurora.org \
--to=pprakash@codeaurora.org \
--cc=alexey.klimov@arm.com \
--cc=ashwin.chaugule@linaro.org \
--cc=hotran@apm.com \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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