~lttng/urcu/trunk

Viewing all changes in revision 1246.

  • Committer: Mathieu Desnoyers
  • Author(s): Jérémie Galarneau
  • Date: 2018-12-09 11:47:37 UTC
  • Revision ID: git-v1:5bbe95bb510534d0a5bab8d7d205b32d6e4a57b2
Fix: only wait if work queue is empty in real-time mode

Unconditionally waiting for 10 ms after the completion of every batch
of jobs of the work queue in real-time mode appears to be a behaviour
inherited from the call-rcu thread.

While this is a fair trade-off in the context of call-rcu, it is less
evident that it is desirable in the context of a general-purpose
work queue. Waiting when work is available artificially degrades the
latency characteristics of the work queue.

If a workqueue user even need the explicit delay for batching (e.g. if
a call-rcu implementation would ever use the workqueue worker thread),
it can add it within the worker_before_wait_fct callback received as
argument from workqueue creation.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: