From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752957AbcEZGfw (ORCPT ); Thu, 26 May 2016 02:35:52 -0400 Received: from mga01.intel.com ([192.55.52.88]:31770 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752693AbcEZGfv (ORCPT ); Thu, 26 May 2016 02:35:51 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,366,1459839600"; d="scan'208";a="974794983" Date: Thu, 26 May 2016 06:38:24 +0800 From: Yuyang Du To: Vincent Guittot Cc: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com Subject: Re: [PATCH v2] sched: fix first task of a task group is attached twice Message-ID: <20160525223824.GI18670@intel.com> References: <1464095335-27730-1-git-send-email-vincent.guittot@linaro.org> <1464188472-30086-1-git-send-email-vincent.guittot@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464188472-30086-1-git-send-email-vincent.guittot@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 25, 2016 at 05:01:11PM +0200, Vincent Guittot wrote: > The cfs_rq->avg.last_update_time is initialize to 0 with the main effect > that the 1st sched_entity that will be attached, will keep its > last_update_time set to 0 and will attached once again during the > enqueue. > Initialize cfs_rq->avg.last_update_time to 1 instead. Actually, the first time (attach_task_cfs_rq()) is called even way before init_entity_runnable_average(), no?