Re: [PATCH v2 1/2] sched/rt: Check to push the task when changing its affinity

2015-02-08 Thread Xunlei Pang
On 8 February 2015 at 22:55, Xunlei Pang wrote: > Hi Steve, > > On 7 February 2015 at 05:09, Steven Rostedt wrote: >> On Thu, 5 Feb 2015 23:59:33 +0800 >> >> if (task_running(rq, p)) { >> if (cpumask_test_cpu() && cpupri_find()) { >> } >> } else {

Re: [PATCH v2 1/2] sched/rt: Check to push the task when changing its affinity

2015-02-08 Thread Xunlei Pang
Hi Steve, On 7 February 2015 at 05:09, Steven Rostedt wrote: > On Thu, 5 Feb 2015 23:59:33 +0800 >> + >> + if (task_running(rq, p) && >> + cpumask_test_cpu(task_cpu(p), new_mask) && > > Why the check for task_cpu being in new_mask? If the current cpu of this task is

Re: [PATCH v2 1/2] sched/rt: Check to push the task when changing its affinity

2015-02-06 Thread Steven Rostedt
On Thu, 5 Feb 2015 23:59:33 +0800 Xunlei Pang wrote: return p; > @@ -1886,28 +1892,73 @@ static void set_cpus_allowed_rt(struct task_struct *p, > const struct cpumask *new_mask) > { > struct rq *rq; > - int weight; > + int old_weight, new_weigh

[PATCH v2 1/2] sched/rt: Check to push the task when changing its affinity

2015-02-05 Thread Xunlei Pang
From: Xunlei Pang We may suffer from extra rt overload rq due to the affinity, so when the affinity of any runnable rt task is changed, we should check to trigger balancing, otherwise it will cause some unnecessary delayed real-time response. Unfortunately, current RT global scheduler doesn't tri