LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: "Ingo Molnar" <mingo@kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Clark Williams" <williams@redhat.com>,
	linux-rt-users <linux-rt-users@vger.kernel.org>,
	"Mike Galbraith" <umgwanakikbuti@gmail.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	"Jörn Engel" <joern@purestorage.com>
Subject: Re: [RFC][PATCH v2] sched/rt: Use IPI to trigger RT task push migration instead of pulling
Date: Tue, 24 Feb 2015 13:45:32 -0500	[thread overview]
Message-ID: <20150224134532.1c7c5060@gandalf.local.home> (raw)
In-Reply-To: <20150224133946.3948c4b7@gandalf.local.home>

On Tue, 24 Feb 2015 13:39:46 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:
  
> +static void tell_cpu_to_push(int cpu, struct rq *rq, int prio)
> +{
> +	/* We should never be here if the IPI is already out. */
> +	BUG_ON(rq->rt.push_csd_pending);
> +
> +	rq->rt.push_csd_pending = 1;
> +	rq->rt.push_csd_cpu = cpu;
> +	/* Save the prio that we used to find this CPU */
> +	rq->rt.push_csd_prio = prio;
> +
> +	/* Make sure csd_cpu is visible before we send the ipi */
> +	smp_mb();
> +
> +	smp_call_function_single_async(cpu, &rq->rt.push_csd);
> +}



> +	rt_rq->push_csd_cpu = next_cpu;
> +	rt_rq->push_csd_prio = next_prio;
> +
> +	/* Make sure the next cpu is seen on remote CPU */
> +	smp_mb();

BTW, would a smp_wmb() be enough here. I was a little paranoid about
the irq work and smp_call_functon above some how leaking before the
barrier. I'm probably just being too paranoid, and these can be
switched to smp_wmb(). But for now I'll just keep being a freak.

-- Steve


> +
> +	irq_work_queue_on(&rt_rq->push_csd_work, next_cpu);
> +
> +	return;
> +


  reply	other threads:[~2015-02-24 18:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24 18:39 Steven Rostedt
2015-02-24 18:45 ` Steven Rostedt [this message]
2015-02-24 21:23 ` Steven Rostedt
2015-02-25 10:35 ` Peter Zijlstra
2015-02-25 15:51   ` Steven Rostedt
2015-02-25 17:11     ` Peter Zijlstra
2015-02-25 17:41       ` Peter Zijlstra
2015-02-25 17:50       ` Steven Rostedt
2015-02-26  7:45         ` Peter Zijlstra
2015-02-26 12:43           ` Steven Rostedt
2015-02-26 13:47             ` Peter Zijlstra
2015-02-26 14:00               ` Steven Rostedt
2015-02-26  7:49         ` Peter Zijlstra
2015-02-26 12:46           ` Steven Rostedt
2015-02-25  7:56 Hillf Danton

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=20150224134532.1c7c5060@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=joern@purestorage.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=umgwanakikbuti@gmail.com \
    --cc=williams@redhat.com \
    --subject='Re: [RFC][PATCH v2] sched/rt: Use IPI to trigger RT task push migration instead of pulling' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).