Performance: mark ring buffer do_copy callers always inline
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 25 Sep 2016 14:46:44 +0000 (10:46 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 25 Sep 2016 14:46:44 +0000 (10:46 -0400)
commitd723e9056812fdee222f1156f45f7a43393c5863
tree268ba3c8b355bdef705e23471f0be65c679954c0
parent8617eb9a6f9dd4e63f8cb649120b3b3ae79df4f0
Performance: mark ring buffer do_copy callers always inline

The underlying copy operation is more efficient if the size is a
constant, which only happens if this function is inlined in the caller.
Otherwise, we end up calling memcpy for each field.

Force inlining for performance reasons for:
  - lib_ring_buffer_do_strcpy,
  - lib_ring_buffer_do_strcpy_from_user_inatomic,
  - lib_ring_buffer_copy_from_user_inatomic.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/ringbuffer/backend.h
This page took 0.026452 seconds and 4 git commands to generate.