[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140526160224.GM30445@twins.programming.kicks-ass.net>
Date: Mon, 26 May 2014 18:02:24 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Frederic Weisbecker <fweisbec@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
Kevin Hilman <khilman@...aro.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Viresh Kumar <viresh.kumar@...aro.org>
Subject: Re: [PATCH 3/5] irq_work: Implement remote queueing
On Sun, May 25, 2014 at 04:29:49PM +0200, Frederic Weisbecker wrote:
> +bool irq_work_queue_on(struct irq_work *work, int cpu)
> +{
> + /* Only queue if not already pending */
> + if (!irq_work_claim(work))
> + return false;
> +
> + /* All work should have been flushed before going offline */
> + WARN_ON_ONCE(cpu_is_offline(cpu));
WARN_ON_ONCE(in_nmi());
Also, I would do both these checks before the claim thing.
> +
> + if (llist_add(&work->llnode, &per_cpu(raised_list, cpu)))
> + native_send_call_func_single_ipi(cpu);
> +
> + return true;
> +}
> +EXPORT_SYMBOL_GPL(irq_work_queue_on);
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists