]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit445a6d1e51bda852d05c374b83eb46139084c575
tree77ccc8e85f9be6af5cce5e689b6766a1fadf613b
parenta5ec079ccd8420c18da3b875d32284664d9cd04e
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