All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Yuyang Du <yuyang.du@intel.com>
Subject: Re: [PATCH v3] sched: fix first task of a task group is attached twice
Date: Mon, 6 Jun 2016 20:32:49 +0100	[thread overview]
Message-ID: <5755CFE1.4020005@arm.com> (raw)
In-Reply-To: <CAKfTPtD401C5_DTPPCMDmV87y2r5sG_066drJQtaFN5-G+9bsA@mail.gmail.com>

On 01/06/16 16:54, Vincent Guittot wrote:
> On 1 June 2016 at 17:31, Dietmar Eggemann <dietmar.eggemann@arm.com> wrote:
>> On 30/05/16 16:52, 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
>>
>> attached in .task_move_group ?
>>
>> I'm not sure if we can have a .switched_to() directly followed by a
>> .enqueue_task() into a cfs_rq with avg.last_update_time = 0.
> 
> I think it can happen as well if the task is not queued during the
> change of scheduling class because when we attach the task in
> switched_to, the task->se.avg.last_update_time will stay to 0. So when
> the task will be enqueued, it will be attached one more time

You're right. 

So I started msc_test as an rt task in task group tg_1 (css.id=2) (1) and when it slept 
I changed it to become a cfs task (2).


(1) # chrt -r 99 ./cg.sh /tg_1 ./msc_test

(2) # chrt -o -p 0 2093

...
---> busy
[   84.336570] dequeue_task_rt: cpu=2 comm=msc_test pid=2093 tg_css_id=2
[   84.342948] enqueue_task_rt: cpu=1 comm=msc_test pid=2093 tg_css_id=2
---> sleep
[   86.548655] dequeue_task_rt: cpu=1 comm=msc_test pid=2093 tg_css_id=2
[   91.008457] switched_from_rt: cpu=1 comm=msc_test pid=2093
[   91.013896] switched_to_fair: cpu=1 comm=msc_test pid=2093
[   91.019336] attach_entity_load_avg: cpu=1 comm=msc_test pid=2093 last_update_time=0 tg->css.id=2
[   91.028499] do_sched_setscheduler comm=msc_test pid=2093 policy=0 rv=0
[   91.548807] enqueue_task_fair: cpu=1 comm=msc_test pid=2093 tg_css_id=2
[   91.555363] attach_entity_load_avg: cpu=1 comm=msc_test pid=2093 last_update_time=91548795220 tg->css.id=2
---> busy
...

  reply	other threads:[~2016-06-06 19:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 13:08 [PATCH] sched: fix first task of a task group is attached twice Vincent Guittot
2016-05-25 15:01 ` [PATCH v2] " Vincent Guittot
2016-05-25 22:38   ` Yuyang Du
2016-05-26  8:26     ` Vincent Guittot
2016-05-26  0:40       ` Yuyang Du
2016-05-26  8:51         ` Vincent Guittot
2016-05-27 15:48   ` Dietmar Eggemann
2016-05-27 17:16     ` Vincent Guittot
2016-05-27 20:38       ` Dietmar Eggemann
2016-05-30  7:04         ` Vincent Guittot
2016-05-30 15:52           ` [PATCH v3] " Vincent Guittot
2016-05-30 19:48             ` Yuyang Du
2016-05-31  7:28               ` Vincent Guittot
2016-05-31  0:44                 ` Yuyang Du
2016-06-01 15:31             ` Dietmar Eggemann
2016-06-01 15:54               ` Vincent Guittot
2016-06-06 19:32                 ` Dietmar Eggemann [this message]
2016-06-07  7:35                   ` Vincent Guittot
2016-06-15 19:19             ` Yuyang Du
2016-06-16  7:12               ` Vincent Guittot
2016-06-15 23:24                 ` Yuyang Du
2016-06-16  9:42                   ` Vincent Guittot
2016-05-30 15:54         ` [PATCH v2] " Vincent Guittot

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=5755CFE1.4020005@arm.com \
    --to=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=vincent.guittot@linaro.org \
    --cc=yuyang.du@intel.com \
    /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.