From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752522AbbHMKVS (ORCPT ); Thu, 13 Aug 2015 06:21:18 -0400 Received: from mga09.intel.com ([134.134.136.24]:46698 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752430AbbHMKVR (ORCPT ); Thu, 13 Aug 2015 06:21:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,669,1432623600"; d="scan'208";a="541118009" Date: Thu, 13 Aug 2015 10:30:49 +0800 From: Yuyang Du To: Byungchul Park Cc: mingo@kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched: sync with the cfs_rq when changing sched class Message-ID: <20150813023049.GA3523@intel.com> References: <1439445355-24137-1-git-send-email-byungchul.park@lge.com> <20150812224145.GA2143@intel.com> <20150813071904.GN3956@byungchulpark-X58A-UD3R> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150813071904.GN3956@byungchulpark-X58A-UD3R> 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 Thu, Aug 13, 2015 at 04:19:04PM +0900, Byungchul Park wrote: > > > #ifdef CONFIG_SMP > > > /* synchronize task with its prev cfs_rq */ > > > - if (!queued) > > > - __update_load_avg(cfs_rq->avg.last_update_time, cpu_of(rq_of(cfs_rq)), > > > - &se->avg, se->on_rq * scale_load_down(se->load.weight), > > > - cfs_rq->curr == se, NULL); > > > - > > > - /* remove our load when we leave */ > > > - cfs_rq->avg.load_avg = max_t(long, cfs_rq->avg.load_avg - se->avg.load_avg, 0); > > > - cfs_rq->avg.load_sum = max_t(s64, cfs_rq->avg.load_sum - se->avg.load_sum, 0); > > > - cfs_rq->avg.util_avg = max_t(long, cfs_rq->avg.util_avg - se->avg.util_avg, 0); > > > - cfs_rq->avg.util_sum = max_t(s32, cfs_rq->avg.util_sum - se->avg.util_sum, 0); > > > + detach_entity_load_avg(cfs_rq, se); > > > #endif > > > > You changed the logic. > > yes, i changed it. but i think that calling __update_load_avg() is not > a problem even in case of "queued == 1". so i didn't think that change > seriously. > > wrong? :( > It is not a problem, but any good or maybe any bad? And I would suggest you add the comment I gave you.