[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1303291210250.22263@ionos>
Date: Fri, 29 Mar 2013 12:22:54 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: "Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
cc: LKML <linux-kernel@...r.kernel.org>, linux-arch@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Rusty Russell <rusty@...tcorp.com.au>,
Paul McKenney <paulmck@...ux.vnet.ibm.com>,
Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <peterz@...radead.org>,
Magnus Damm <magnus.damm@...il.com>,
Richard Henderson <rth@...ddle.net>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matt Turner <mattst88@...il.com>
Subject: Re: [patch 07/34] alpha: Use generic idle loop
On Thu, 28 Mar 2013, Srivatsa S. Bhat wrote:
> (In all my replies, I'm referring to the code in your v2 on your git
> tree, but replying to the corresponding patches in your v1).
>
> So, in alpha, we poll in cpu idle. In the generic implementation in
> kernel/cpu/idle.c, arch_cpu_idle() is defined as:
>
> void __weak arch_cpu_idle(void)
> {
> cpu_idle_poll();
> }
>
> Should it not have been:
>
> void __weak arch_cpu_idle(void)
> {
> current_set_polling();
> cpu_idle_poll();
> current_clr_polling();
> }
>
> instead?
Hmm, we should not clear it at all, because we are always polling and
never leave polling mode. So instead of calling cpu_idle_poll from the
weak arch_cpu_idle() we should set cpu_idle_force_poll so we drop into
if (cpu_idle_force_poll) {
cpu_idle_poll();
} else ...
which keeps the polling flag set.
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists