lkml.org 
[lkml]   [2013]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH v1 15/31] ARC: Process/scheduling/clock/Timers/Delay Management
From
2013/1/2 Vineet Gupta <Vineet.Gupta1@synopsys.com>:
> On Tuesday 13 November 2012 01:59 AM, Thomas Gleixner wrote:
>> On Wed, 7 Nov 2012, Vineet Gupta wrote:
>>> +void cpu_idle(void)
>>> +{
>>> + /* Since we SLEEP in idle loop, TIF_POLLING_NRFLAG can't be set */
>>> +
>>> + /* endless idle loop with no priority at all */
>>> + while (1) {
>>> + tick_nohz_idle_enter();
>>> +
>>> + while (!need_resched())
>>> + arch_idle();
>>> +
>>> + tick_nohz_idle_exit();
>>> +
>>> + preempt_enable_no_resched();
>>> + schedule();
>>> + preempt_disable();
>>
>> schedule_preempt_disabled() please
>
>
> OK ! And it seems I was also missing the calls to rcu_idle_enter()/exit() to track
> commit 1268fbc746ea "nohz: Remove tick_nohz_idle_enter_norcu() / ..."

Right!

They must be placed around the code that sets the low power mode, when
you know there is no use of RCU between rcu_idle_enter() /
rcu_idle_exit(). Here this would be likely:

while (1) {
tick_nohz_idle_enter();

+ rcu_idle_enter();
while (!need_resched())
arch_idle();
+ rcu_idle_exit()

tick_nohz_idle_exit();
schedule_preempt_disabled();
}


\
 
 \ /
  Last update: 2013-01-04 14:41    [W:1.909 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site