summaryrefslogtreecommitdiffstats
path: root/src/util/u_queue.h
Commit message (Collapse)AuthorAgeFilesLines
* util/u_queue: add util_queue_fence_wait_timeoutNicolai Hähnle2017-11-091-21/+33
| | | | | | | | v2: - style fixes - fix missing timeout handling in futex path Reviewed-by: Marek Olšák <[email protected]>
* u_queue: add util_queue_finish for waiting for previously added jobsNicolai Hähnle2017-11-091-0/+2
| | | | | | | | | Schedule one job for every thread, and wait on a barrier inside the job execution function. v2: avoid alloca (fixes Windows build error) Reviewed-by: Marek Olšák <[email protected]> (v1)
* u_queue: add a futex-based implementation of fencesNicolai Hähnle2017-11-091-0/+92
| | | | | | | | | | | | | | | | | Fences are now 4 bytes instead of 96 bytes (on my 64-bit system). Signaling a fence is a single atomic operation in the fast case plus a syscall in the slow case. Testing if a fence is signaled is the same as before (a simple comparison), but waiting on a fence is now no more expensive than just testing it in the fast (already signaled) case. v2: - style fixes - use p_atomic_xxx macros with the right barriers Acked-by: Marek Olšák <[email protected]>
* u_queue: add util_queue_fence_resetNicolai Hähnle2017-11-091-0/+13
| | | | Reviewed-by: Marek Olšák <[email protected]>
* u_queue: export util_queue_fence_signalNicolai Hähnle2017-11-091-0/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* u_queue: group fence functions togetherNicolai Hähnle2017-11-091-9/+10
| | | | Reviewed-by: Marek Olšák <[email protected]>
* util/u_queue: add an option to resize the queue when it's fullMarek Olšák2017-07-171-0/+2
| | | | | | | | | | | | | | | | | | | | Consider the following situation: mtx_lock(mutex); do_something(); util_queue_add_job(...); mtx_unlock(mutex); If the queue is full, util_queue_add_job will wait for a free slot. If the job which is currently being executed tries to lock the mutex, it will be stuck forever, because util_queue_add_job is stuck. The deadlock can be trivially resolved by increasing the queue size (reallocating the queue) in util_queue_add_job if the queue is full. Then util_queue_add_job becomes wait-free. radeonsi will use it. Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa/glthread: add glthread "perf" counters and pass them to gallium HUDMarek Olšák2017-06-261-0/+14
| | | | | | | | | | | for HUD integration in following commits. This valuable profiling data will allow us to see on the HUD how well glthread is able to utilize parallelism. This is better than benchmarking, because you can see exactly what's happening and you don't have to be CPU-bound. u_threaded_context has the same counters. Reviewed-by: Timothy Arceri <[email protected]>
* util/u_queue: fix a use-before-initialization race for queue->threadsMarek Olšák2017-06-071-1/+0
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* util/u_queue: add an option to set the minimum thread priorityMarek Olšák2017-06-071-1/+5
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* util/u_queue: add a way to remove a job when we just want to destroy itMarek Olšák2017-06-071-0/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* util/u_queue: make u_queue accessible to cppTimothy Arceri2017-03-131-0/+8
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: move u_queue.{c,h} to src/utilTimothy Arceri2017-03-121-0/+109
This will allow us to use it outside of gallium for things like compressing shader cache entries. Reviewed-by: Marek Olšák <[email protected]>