Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1415790
| From | Vincent Guittot <vincent.guittot@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3] sched: fix first task of a task group is attached twice |
| Date | 2016-06-07 09:40 +0200 |
| Message-ID | <rHjMe-897-11@gated-at.bofh.it> (permalink) |
| References | <rEpuP-YG-45@gated-at.bofh.it> <rExLI-6b9-9@gated-at.bofh.it> <rFgpt-1H0-63@gated-at.bofh.it> <rFgIO-1Ow-23@gated-at.bofh.it> <rH8xs-G0-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Dietmar, On 6 June 2016 at 21:32, Dietmar Eggemann <dietmar.eggemann@arm.com> wrote: > 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 > ... Thanks for testing the sequence
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH v3] sched: fix first task of a task group is attached twice Dietmar Eggemann <dietmar.eggemann@arm.com> - 2016-06-01 17:40 +0200
Re: [PATCH v3] sched: fix first task of a task group is attached twice Vincent Guittot <vincent.guittot@linaro.org> - 2016-06-01 18:00 +0200
Re: [PATCH v3] sched: fix first task of a task group is attached twice Dietmar Eggemann <dietmar.eggemann@arm.com> - 2016-06-06 21:40 +0200
Re: [PATCH v3] sched: fix first task of a task group is attached twice Vincent Guittot <vincent.guittot@linaro.org> - 2016-06-07 09:40 +0200
csiph-web