ring-buffer: Do not use schedule_work_on() for current CPU
authorSteven Rostedt (Red Hat) <srostedt@redhat.com>
Thu, 7 Mar 2013 14:27:42 +0000 (09:27 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 15 Mar 2013 04:35:52 +0000 (00:35 -0400)
commitf5eb5588262cab7232ed1d77cf612b327db50767
tree77ccc8e85f9be6af5cce5e689b6766a1fadf613b
parentad909e21bbe69f1d39055d346540abd827190eca
ring-buffer: Do not use schedule_work_on() for current CPU

The ring buffer updates when done while the ring buffer is active,
needs to be completed on the CPU that is used for the ring buffer
per_cpu buffer. To accomplish this, schedule_work_on() is used to
schedule work on the given CPU.

Now there's no reason to use schedule_work_on() if the process
doing the update happens to be on the CPU that it is processing.
It has already filled the requirement. Instead, just do the work
and continue.

This is needed for tracing_snapshot_alloc() where it may be called
really early in boot, where the work queues have not been set up yet.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ring_buffer.c