Re: [PATCH] sched/core: Remove unnecessary initialization init_idle_bootup_task()
From: Peter Zijlstra
Date: Fri Aug 04 2017 - 05:43:34 EST
On Fri, Aug 04, 2017 at 05:19:37PM +0800, Cheng Jian wrote:
> init_idle_bootup_task( ) is called in rest_init( ) to switch
> the scheduling class of the boot thread to the idle class
>
> the function only set :
> idle->sched_class = &idle_sched_class;
> which has been set in init_idle() called by sched_init()
> /*
> * The idle tasks have their own, simple scheduling class:
> */
> idle->sched_class = &idle_sched_class;
>
> We've already set the boot thread to idle class in
> start_kernel()->sched_init()->init_idle()
> so it's unnecessary to set it again in
> start_kernel()->rest_init()->init_idle_bootup_task()
Yeah, does look a bit redundant. Thanks!