public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v4 1/2] sched/rt: Check to push the task away after its affinity was changed
       [not found] <1435994483-2766-1-git-send-email-xlpang@126.com>
@ 2015-07-06 12:48 ` Peter Zijlstra
  0 siblings, 0 replies; only message in thread
From: Peter Zijlstra @ 2015-07-06 12:48 UTC (permalink / raw)
  To: Xunlei Pang
  Cc: linux-kernel, Steven Rostedt, Juri Lelli, Ingo Molnar,
	Xunlei Pang

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-06 12:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1435994483-2766-1-git-send-email-xlpang@126.com>
2015-07-06 12:48 ` [PATCH v4 1/2] sched/rt: Check to push the task away after its affinity was changed Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox