Messages in this thread | | | Date | Tue, 7 Jun 2016 03:15:52 +0800 | From | Yuyang Du <> | Subject | Re: [PATCH v4 3/5] sched/fair: Skip detach sched avgs for new task when changing task groups |
| |
On Mon, Jun 06, 2016 at 03:03:38PM +0100, Matt Fleming wrote: > > #ifdef CONFIG_FAIR_GROUP_SCHED > > -static void task_move_group_fair(struct task_struct *p) > > +static void task_move_group_fair(struct task_struct *p, bool fork) > > { > > - detach_task_cfs_rq(p); > > + /* > > + * Newly forked task should not be removed from any cfs_rq > > + */ > > + if (!fork) > > + detach_task_cfs_rq(p); > > set_task_rq(p, task_cpu(p)); > > attach_task_cfs_rq(p); > > /* > > Wouldn't it be more symmetric to add, > > if (p->se.avg.last_update_time) > __update_load_avg(...) > > to detach_entity_load_avg() so that there's no need to pass the @fork > parameter all the way down the stack
Up to this point, we can't. But we should be able to if we move the next patch (4/5) before this patch. I should have changed my mindset with that patch. Good advice though, thanks, Matt.
| |