Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751911AbbHLX6P (ORCPT ); Wed, 12 Aug 2015 19:58:15 -0400 Received: from lgeamrelo04.lge.com ([156.147.1.127]:63310 "EHLO lgeamrelo04.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751137AbbHLX6N (ORCPT ); Wed, 12 Aug 2015 19:58:13 -0400 X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com Date: Thu, 13 Aug 2015 08:57:41 +0900 From: Byungchul Park To: Yuyang Du Cc: mingo@kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] sched: sync with the prev cfs when changing cgroup within a cpu Message-ID: <20150812235741.GM3956@byungchulpark-X58A-UD3R> References: <1439363115-2259-1-git-send-email-byungchul.park@lge.com> <20150812010548.GA28764@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150812010548.GA28764@intel.com> 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 Content-Length: 1748 Lines: 48 On Wed, Aug 12, 2015 at 09:05:48AM +0800, Yuyang Du wrote: > On Wed, Aug 12, 2015 at 04:05:15PM +0900, byungchul.park@lge.com wrote: > > > > current code seems to be wrong with cfs_rq's avg loads when changing > > a task's cgroup(=cfs_rq) to another. i tested with "echo pid > cgroup" and > > found that e.g. cfs_rq->avg.load_avg became larger and larger whenever i > > changed a cgroup to another again and again. > > > > we have to sync se's average load with both *prev* cfs_rq and next cfs_rq > > when changing its group. > > > > I think you are right in general, it has nothing to do with > migrate_task_rq_fair() and the load should be carried to new cfs_rq. > > But whether it is queued or not should be doing the same thing, so what about: hello yuyang, i worked with code based on torvalds git, but now.. in tip git where sched code is renewed much, i think you are right. i will fix it. thank you much. :) Byungchul > > /* if queued, the previous dequeue_task() should have already done it */ > if (!queued) > __upload_load_avg() > > remove_from_old_cfs_rq(); > > /* virtually catch up because of the skew between cfs_rqs */ > task's last_update_time = cfs_rq's last_update_time; > add_to_new_cfs_rq(); > > Thanks, > Yuyang > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/