]> git.lttng.org Git - urcu.git/commit
workqueue/waitqueue: use lock-free stack for wakeup
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 22 Oct 2014 10:54:25 +0000 (06:54 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 22 Oct 2014 10:54:25 +0000 (06:54 -0400)
commit7a618cf73bc9da1a6d258f361a41ed9e6f1b9f88
tree47ebe5576eebd3156a1e0380070898fc33b0fae0
parent89d9e122ae85ff530faceb2b077af7cabf702170
workqueue/waitqueue: use lock-free stack for wakeup

The case for which we try to reduce latency is the wakeup, not the
"wait", since "wait" is typically done when a thread is ready to put
itself asleep awaiting for more work.

wfstack has blocking "pop" operation, which means that if a worker
thread is delayed for an extremely long amount of time during the push
operation (add to waitqueue), it could delay execution of pop (wakeup)
for that same amount of time.

lfstack does not have this downside, at the expense of having the "wait"
operation (push) being only lock-free rather than wait-free. However,
since we don't care that much about "wait" being wait-free, it makes
sense to use lfstack here.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu/waitqueue-lifo.h
urcu/workqueue-fifo.h
This page took 0.030678 seconds and 4 git commands to generate.