public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Xunlei Pang <xlpang@126.com>
Cc: linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Juri Lelli <juri.lelli@gmail.com>, Ingo Molnar <mingo@redhat.com>,
	Xunlei Pang <pang.xunlei@linaro.org>
Subject: Re: [PATCH v4 1/2] sched/rt: Check to push the task away after its affinity was changed
Date: Mon, 6 Jul 2015 14:48:27 +0200	[thread overview]
Message-ID: <20150706124827.GF3644@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1435994483-2766-1-git-send-email-xlpang@126.com>

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.

           reply	other threads:[~2015-07-06 12:48 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1435994483-2766-1-git-send-email-xlpang@126.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150706124827.GF3644@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=juri.lelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pang.xunlei@linaro.org \
    --cc=rostedt@goodmis.org \
    --cc=xlpang@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox