From: Peter Zijlstra <peterz@infradead•org>
To: Preeti U Murthy <preeti@linux•vnet.ibm.com>
Cc: Nicolas Pitre <nicolas.pitre@linaro•org>,
Lists linaro-kernel <linaro-kernel@lists•linaro.org>,
"linux-pm@vger•kernel.org" <linux-pm@vger•kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro•org>,
"Rafael J. Wysocki" <rjw@rjwysocki•net>,
LKML <linux-kernel@vger•kernel.org>,
Ingo Molnar <mingo@redhat•com>,
Thomas Gleixner <tglx@linutronix•de>,
linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH 1/2] PPC: powernv: remove redundant cpuidle_idle_call()
Date: Fri, 7 Feb 2014 13:41:40 +0100 [thread overview]
Message-ID: <20140207124140.GB9987@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <52F4C666.4050308@linux.vnet.ibm.com>
On Fri, Feb 07, 2014 at 05:11:26PM +0530, Preeti U Murthy wrote:
> But observe the idle state "snooze" on powerpc. The power that this idle
> state saves is through the lowering of the thread priority of the CPU.
> After it lowers the thread priority, it is done. It cannot
> "wait_for_interrupts". It will exit my_idle(). It is now upto the
> generic idle loop to increase the thread priority if the need_resched
> flag is set. Only an interrupt routine can increase the thread priority.
> Else we will need to do it explicitly. And in such states which have a
> polling nature, the cpu will not receive a reschedule IPI.
>
> That is why in the snooze_loop() we poll on need_resched. If it is set
> we up the priority of the thread using HMT_MEDIUM() and then exit the
> my_idle() loop. In case of interrupts, the priority gets automatically
> increased.
You can poll without setting TS_POLLING/TIF_POLLING_NRFLAGS just fine
and get the IPI if that is what you want.
Depending on how horribly unprovisioned the thread gets at the lowest
priority, that might actually be faster than polling and raising the
prio whenever it does get ran.
next prev parent reply other threads:[~2014-02-07 12:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 14:16 [PATCH 1/2] PPC: powernv: remove redundant cpuidle_idle_call() Nicolas Pitre
2014-02-06 14:16 ` [PATCH 2/2] ARM64: " Nicolas Pitre
2014-02-06 14:20 ` Thomas Gleixner
2014-02-06 15:59 ` Preeti U Murthy
2014-02-06 16:09 ` Nicolas Pitre
2014-02-06 16:20 ` Daniel Lezcano
2014-02-07 9:50 ` Catalin Marinas
2014-02-06 14:20 ` [PATCH 1/2] PPC: " Thomas Gleixner
2014-02-06 15:56 ` Preeti U Murthy
2014-02-06 16:25 ` Daniel Lezcano
2014-02-06 16:49 ` Preeti U Murthy
2014-02-07 1:17 ` Nicolas Pitre
2014-02-07 5:27 ` Preeti U Murthy
2014-02-07 10:48 ` Nicolas Pitre
2014-02-07 11:41 ` Preeti U Murthy
2014-02-07 12:41 ` Peter Zijlstra [this message]
2014-02-10 3:45 ` Preeti U Murthy
2014-02-07 7:01 ` Preeti U Murthy
2014-02-07 9:45 ` Deepthi Dharwar
2014-02-07 11:00 ` Preeti U Murthy
2014-02-14 11:17 ` Preeti U Murthy
2014-02-14 11:25 ` Deepthi Dharwar
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=20140207124140.GB9987@twins.programming.kicks-ass.net \
--to=peterz@infradead$(echo .)org \
--cc=daniel.lezcano@linaro$(echo .)org \
--cc=linaro-kernel@lists$(echo .)linaro.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-pm@vger$(echo .)kernel.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mingo@redhat$(echo .)com \
--cc=nicolas.pitre@linaro$(echo .)org \
--cc=preeti@linux$(echo .)vnet.ibm.com \
--cc=rjw@rjwysocki$(echo .)net \
--cc=tglx@linutronix$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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