On Tue, 24 Feb 2015 13:39:46 -0500
Steven Rostedt <rost...@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;
> +

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to