From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752100AbdHDJn3 (ORCPT ); Fri, 4 Aug 2017 05:43:29 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:47494 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751294AbdHDJn2 (ORCPT ); Fri, 4 Aug 2017 05:43:28 -0400 Date: Fri, 4 Aug 2017 11:43:23 +0200 From: Peter Zijlstra To: Cheng Jian Cc: mingo@redhat.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, xiexiuqi@huawei.com, huawei.libin@huawei.com Subject: Re: [PATCH] sched/core: Remove unnecessary initialization init_idle_bootup_task() Message-ID: <20170804094323.itq4lcjtf7puxyms@hirez.programming.kicks-ass.net> References: <1501838377-109720-1-git-send-email-cj.chengjian@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1501838377-109720-1-git-send-email-cj.chengjian@huawei.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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!