Re: [RFC PATCH for 4.21 03/16] sched: Implement push_task_to_cpu (v2)

2018-10-17 Thread Mathieu Desnoyers
- On Oct 17, 2018, at 2:51 AM, Srikar Dronamraju sri...@linux.vnet.ibm.com wrote: > Hi Mathieu, > >> +int push_task_to_cpu(struct task_struct *p, unsigned int dest_cpu) >> +{ > > In your use case, is the task going to be current? > If yes, we should simply be using migrate_task_to. > >> +

Re: [RFC PATCH for 4.21 03/16] sched: Implement push_task_to_cpu (v2)

2018-10-16 Thread Srikar Dronamraju
Hi Mathieu, > +int push_task_to_cpu(struct task_struct *p, unsigned int dest_cpu) > +{ In your use case, is the task going to be current? If yes, we should simply be using migrate_task_to. > + struct rq_flags rf; > + struct rq *rq; > + int ret = 0; > + > + rq = task_rq_lock(p, &r

[RFC PATCH for 4.21 03/16] sched: Implement push_task_to_cpu (v2)

2018-10-10 Thread Mathieu Desnoyers
Implement push_task_to_cpu(), which moves the task received as argument to the destination cpu's runqueue. It only does so if the CPU is within the CPU allowed mask of the task and if the CPU is active. If the CPU is not part of the allowed mask, -EINVAL is returned. If the CPU is not active, -EBUS