urcu:urcu/workqueue-wakeup

Last commit made on 2014-10-24
Get this branch:
git clone -b urcu/workqueue-wakeup https://git.launchpad.net/urcu

Branch merges

Branch information

Name:
urcu/workqueue-wakeup
Repository:
lp:urcu

Recent commits

aa46e09... by Mathieu Desnoyers on 2014-10-24

waitqueue: add in_waitqueue field

Using the waitqueue node next pointer to figure out if the node is
within the queue worked when wfstack was used to implement the queue
stack, but unfortunately it does not keep the same semantic with
lfstack: indeed, the bottom of stack is indicated by a NULL pointer too.

Keep this state in a separate field instead to eliminate coupling
between workqueue, waitqueue and lfstack.

Note that it is OK for a worker to see "in_waitqueue" as temporarily
false when the wait node has just been pop'd from the waitqueue. It's
the opposite that we never want to happen: a worker should never see
"in_waitqueue" as false when the node is actually in the waitqueue,
because it would cause queue corruption.

Signed-off-by: Mathieu Desnoyers <email address hidden>

b19099f... by Mathieu Desnoyers on 2014-10-24

workqueue: use int type for shutdown load/store

"bool" could end up being tricky if other fields are added in the same
structure (updating other fields without lock).

Signed-off-by: Mathieu Desnoyers <email address hidden>

2e1ced1... by Mathieu Desnoyers on 2014-10-24

workqueue: steal all: only steal from workers when steal flag is set

Signed-off-by: Mathieu Desnoyers <email address hidden>

f00ae18... by Mathieu Desnoyers on 2014-10-23

workqueue: handle congestion by clearing queue

Signed-off-by: Mathieu Desnoyers <email address hidden>

2f02be5... by Mathieu Desnoyers on 2014-10-23

workqueue: move work stealing flag to workqueue

Ensure all workers using the same queue use the same flags.

Signed-off-by: Mathieu Desnoyers <email address hidden>

8a2c74f... by Mathieu Desnoyers on 2014-10-23

workqueue: add approximate upper bound to queue length

Signed-off-by: Mathieu Desnoyers <email address hidden>

0a14cd1... by Mathieu Desnoyers on 2014-10-23

workqueue: consider "own" item for do_work criterion

Signed-off-by: Mathieu Desnoyers <email address hidden>

db9916c... by Mathieu Desnoyers on 2014-10-23

workqueue: fix uninitialized next pointer

We use this next pointer to check if the worker in in the wait queue or
not. Therefore, we need to initialize it to NULL.

Signed-off-by: Mathieu Desnoyers <email address hidden>

8313fa6... by Mathieu Desnoyers on 2014-10-23

workqueue: fix uninitialized mutex

Also, tmp_head don't need to hold space for a lock, since only the local
thread is touching it.

Signed-off-by: Mathieu Desnoyers <email address hidden>

a649215... by Mathieu Desnoyers on 2014-10-23

workqueue: keep one work item from stealing co-workers

Takes care of lack of progress issue that could theoretically occur due
to a steady work-stealing circular loop amongst co-workers. Keeping a
work item hidden from co-workers ensures forward progress.

Signed-off-by: Mathieu Desnoyers <email address hidden>