• Peter Zijlstra's avatar
    perf: Optimize perf_output_begin() · 85f59edf
    Peter Zijlstra authored
    There's no point in re-doing the memory-barrier when we fail the
    cmpxchg(). Also placing it after the space reservation loop makes it
    clearer it only separates the userpage->tail read from the data
    stores.
    Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
    Cc: Michael Ellerman <michael@ellerman.id.au>
    Cc: Michael Neuling <mikey@neuling.org>
    Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
    Cc: james.hogan@imgtec.com
    Cc: Vince Weaver <vince@deater.net>
    Cc: Victor Kaplansky <VICTORK@il.ibm.com>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Anton Blanchard <anton@samba.org>
    Link: http://lkml.kernel.org/n/tip-c19u6egfldyx86tpyc3zgkw9@git.kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    85f59edf
ring_buffer.c 8.69 KB