Re: [patch] remove set_tsk_need_resched() from init_idle()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Nick Piggin <[email protected]> wrote:

> >it's not really a bug in any architecture - it's a scheduler setup 
> >detail that i changed, and which i initially thought would be best 
> >handled in cpu_idle(), but which is easier to do in rest_init().
> 
> Hmm, what has changed is that secondary CPUs haven't got need_resched 
> set in their idle routines. Whether or not it is possible to a task on 
> their runqueue at that stage, I didn't bother looking - I assume you 
> did.

the idle thread is the first thing that gets on the runqueue of 
secondary CPUs. It's really just the boot process that has this 
inevitable 'we do some stuff before the scheduler has been set up' 
sequence. Secondary CPUs _must not be active_ before their idle thread 
has been set up. (which would be the source of other bugs as well.)

> However, Ingo - instead of calling schedule() at the end of 
> rest_init(), why not just set need_resched instead?

it's slightly smaller code.

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux