Re: [PATCH v4 1/2] sched/rt: Check to push the task away after its affinity was changed
From: Peter Zijlstra
Date: Mon Jul 06 2015 - 08:48:52 EST
On Sat, Jul 04, 2015 at 03:21:22PM +0800, Xunlei Pang wrote:
> @@ -1187,6 +1227,14 @@ int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask)
> }
>
> do_set_cpus_allowed(p, new_mask);
> + /*
> + * rq->lock might get released during __balance_callback(),
> + * but if there's any successful migrating of @p, task_cpu(p)
> + * will obviously be in the new_mask, as p->pi_lock is never
> + * released; Thus, subsequent cpumask_test_cpu() is true and
> + * will make it return safely in such case.
> + */
> + __balance_callback(rq);
>
> /* Can the task run on the task's current CPU? If so, we're done */
> if (cpumask_test_cpu(task_cpu(p), new_mask))
This will trigger the lockdep_pin stuff.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/