From: Preeti U Murthy <preeti@linux.vnet.ibm.com>
To: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Cc: linux-pm@vger.kernel.org,
Daniel Lezcano <daniel.lezcano@linaro.org>,
rjw@rjwysocki.net, linux-kernel@vger.kernel.org, anton@samba.org
Subject: Re: [PATCH] cpuidle: powernv/pseries: Decrease the snooze residency
Date: Fri, 29 May 2015 19:17:17 +0530 [thread overview]
Message-ID: <55686DE5.6010001@linux.vnet.ibm.com> (raw)
In-Reply-To: <1432902728-31476-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com>
Hi Shilpa,
The subject does not convey the purpose of this patch clearly IMO.
I would definitely suggest changing the subject to something like
"Auto promotion of snooze to deeper idle state" or similar.
On 05/29/2015 06:02 PM, Shilpasri G Bhat wrote:
> The idle cpus which stay in snooze for a long period can degrade the
> perfomance of the sibling cpus. If the cpu stays in snooze for more
> than target residency of the next available idle state, then exit from
> snooze. This gives a chance to the cpuidle governor to re-evaluate the
> last idle state of the cpu to promote it to deeper idle states.
>
> Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
> ---
> drivers/cpuidle/cpuidle-powernv.c | 12 ++++++++++++
> drivers/cpuidle/cpuidle-pseries.c | 11 +++++++++++
> 2 files changed, 23 insertions(+)
>
> diff --git a/drivers/cpuidle/cpuidle-pseries.c b/drivers/cpuidle/cpuidle-pseries.c
> index bb9e2b6..07135e0 100644
> --- a/drivers/cpuidle/cpuidle-pseries.c
> +++ b/drivers/cpuidle/cpuidle-pseries.c
> @@ -27,6 +27,8 @@ struct cpuidle_driver pseries_idle_driver = {
>
> static int max_idle_state;
> static struct cpuidle_state *cpuidle_state_table;
> +static u64 snooze_timeout;
> +static bool snooze_timeout_en;
>
> static inline void idle_loop_prolog(unsigned long *in_purr)
> {
> @@ -58,14 +60,18 @@ static int snooze_loop(struct cpuidle_device *dev,
> int index)
> {
> unsigned long in_purr;
> + u64 snooze_exit_time;
>
> idle_loop_prolog(&in_purr);
> local_irq_enable();
> set_thread_flag(TIF_POLLING_NRFLAG);
> + snooze_exit_time = get_tb() + snooze_timeout;
>
> while (!need_resched()) {
> HMT_low();
> HMT_very_low();
> + if (snooze_timeout_en && get_tb() > snooze_exit_time)
> + break;
> }
>
> HMT_medium();
> @@ -244,6 +250,11 @@ static int pseries_idle_probe(void)
> } else
> return -ENODEV;
>
> + if (max_idle_state > 1) {
> + snooze_timeout_en = true;
> + snooze_timeout = cpuidle_state_table[1].target_residency *
> + tb_ticks_per_usec;
> + }
Any idea why we don't have snooze defined on the shared lpar configuration ?
Regards
Preeti U Murthy
> return 0;
> }
>
>
next prev parent reply other threads:[~2015-05-29 13:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 12:32 [PATCH] cpuidle: powernv/pseries: Decrease the snooze residency Shilpasri G Bhat
2015-05-29 13:47 ` Preeti U Murthy [this message]
2015-05-30 6:01 ` Vaidyanathan Srinivasan
2015-05-30 8:00 ` Preeti U Murthy
2015-05-31 1:38 ` Benjamin Herrenschmidt
2015-06-03 15:35 ` Vaidyanathan Srinivasan
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=55686DE5.6010001@linux.vnet.ibm.com \
--to=preeti@linux.vnet.ibm.com \
--cc=anton@samba.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=rjw@rjwysocki.net \
--cc=shilpa.bhat@linux.vnet.ibm.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).