From: Yuyang Du <yuyang.du@intel.com>
To: byungchul.park@lge.com
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
Date: Wed, 12 Aug 2015 09:05:48 +0800 [thread overview]
Message-ID: <20150812010548.GA28764@intel.com> (raw)
In-Reply-To: <1439363115-2259-1-git-send-email-byungchul.park@lge.com>
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:
/* 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
next prev parent reply other threads:[~2015-08-12 8:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 7:05 [PATCH v3] sched: sync with the prev cfs when changing cgroup within a cpu byungchul.park
2015-08-12 1:05 ` Yuyang Du [this message]
2015-08-12 23:57 ` Byungchul Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150812010548.GA28764@intel.com \
--to=yuyang.du@intel.com \
--cc=byungchul.park@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.