Oliver Kowalke
53f82aa349
fix warning in recursive_mutex
2017-05-30 20:53:02 +02:00
Oliver Kowalke
953bcb423e
no data transferred via continuation::resume()
...
- transfer from-context, ready-context, spinlock_lock via context
2017-05-29 18:13:08 +02:00
Oliver Kowalke
20b35d847e
remove unnecessary assertion in scheduler::schedule_from_remote()
...
- in context of #123
- a context migh be in the sleep-queue while another threads signals it
2017-05-26 18:20:33 +02:00
Oliver Kowalke
7ad3261dc6
placement new for context 64byte aligned
2017-05-26 14:33:07 +02:00
Oliver Kowalke
9a651cdcdb
scheduler and main-context allocated with new
2017-05-23 20:08:53 +02:00
Oliver Kowalke
6024aa3494
simpler make-context functions
2017-05-23 17:15:14 +02:00
Oliver Kowalke
e86ca17b15
remove dependency to deprecated execution_context (v1)
2017-05-23 17:15:14 +02:00
Oliver Kowalke
a57314c145
add assertion to round-robin
2017-05-23 17:15:14 +02:00
Daniela Engert
7f21bc9006
Fix compiler warning about narrowing.
...
Signed-off-by: Daniela Engert <dani@ngrt.de >
2017-05-23 17:15:14 +02:00
oliver Kowalke
789dc91aa6
fix additional } if segementedstacks=on is applied
2017-05-08 08:48:19 +02:00
Oliver Kowalke
87c5f1e404
NUMA support
2017-05-06 22:19:57 +02:00
Oliver Kowalke
e2da648726
work-stealing: local random number generator + distribution
2017-04-16 13:15:00 +02:00
Oliver Kowalke
4a42f47ba9
cast diff of pointers to int
...
- the offset is stored on the stack (in front of mem-aligned context)
2017-04-02 21:44:39 +02:00
Oliver Kowalke
aa1b082118
make std::uniform_int_distribution<> static in work-stealing algo
2017-04-01 10:23:33 +02:00
Oliver Kowalke
efb646debe
use additional asserts for scheduler
2017-03-29 20:11:14 +02:00
Oliver Kowalke
547d64d45f
use single-linked instead of double-linked instrusive list
2017-03-27 18:05:55 +02:00
oliver Kowalke
968d5a0d56
reorder member vars for context
2017-03-27 18:05:55 +02:00
Oliver Kowalke
b140113d9e
make scheduler member var non-atomic
...
- synchronize-with/happend-before via atomics in
scheduling-algorithm and queues/channels
2017-03-27 18:05:55 +02:00
oliver Kowalke
44600bfcf5
wrap remote_ready_is_linked() by BOOST_FIBERS_NO_ATOMICS
2017-03-22 13:18:12 +01:00
oliver Kowalke
2bef210265
add addtional asserts
2017-03-22 13:18:12 +01:00
oliver Kowalke
48071238a8
use relaxed-ops for scheduler member variable
2017-03-22 13:18:11 +01:00
oliver Kowalke
b903128504
lock spinlock used in terminate()
2017-03-22 13:18:11 +01:00
oliver Kowalke
65cfbdc8cf
context: rename flags_ to terminated_ and make it non-atomic
2017-03-21 10:31:24 +01:00
oliver Kowalke
4e93113e41
unlock spinlock from ~context() in other context
2017-03-20 11:47:58 +01:00
oliver Kowalke
7e8a34ec81
lock spinlock in ~context() to protect wait-queue
2017-03-20 11:47:51 +01:00
oliver Kowalke
3c6da7265f
reorder unlinking from worker-list
...
- move context::worker_unlink() before context::scheduler_store()
-> unlink happens before store => other threads synchronized with
2017-03-20 09:51:44 +01:00
oliver Kowalke
afff23ff30
add additional asserts in scheduler + context
2017-03-20 09:51:37 +01:00
Oliver Kowalke
a7058fa39a
add asserts to dispatch() for execution-context
2017-03-18 07:06:30 +01:00
Oliver Kowalke
0d62d7c5d2
remote-ready-queue: replace context_mpsc_queue by linked-list + spinlock
2017-03-18 07:05:52 +01:00
Oliver Kowalke
8c6f853201
Revert "use wait-queue based on array"
...
This reverts commit ecb87f2945 .
2017-03-17 19:57:48 +01:00
Oliver Kowalke
ecb87f2945
use wait-queue based on array
2017-03-17 17:52:44 +01:00
oliver Kowalke
332e76ebb8
use steal-op. of context-queues in work_stealing
...
- spinlock-queue is faster than spmc-queue because
spmc-queue fails to steal a non-pinned context
2017-03-17 11:17:05 +01:00
oliver Kowalke
f9ffc21772
work-stealing uses one queue for context'
...
- pinned context (main-/dispatcher-context) pushed
to same queue a worker-context
- no stealing
2017-03-17 09:59:56 +01:00
oliver Kowalke
8303450c35
use memory_order_release for main-/dispatcher context
2017-03-14 11:25:49 +01:00
oliver Kowalke
19494e831d
check if returned cotnext is valid
...
- access data of returend context only if it is valid
- otherwise the stack might be already gone
2017-03-14 11:24:11 +01:00
oliver Kowalke
f828c5599d
test for context is resumable
...
- after picking test wether new context is resumable
- before releasing test wether termianted context is resumable
2017-03-14 11:22:06 +01:00
Oliver Kowalke
564e41dd97
fix barrier implementation
2017-03-12 11:14:36 +01:00
oliver Kowalke
45d1fb3857
additional asserts related to picked context
2017-03-12 11:14:36 +01:00
Oliver Kowalke
1c1e0bfe65
rename set_terminated() -> terminate()
2017-03-05 15:08:52 +01:00
Oliver Kowalke
728bd776ad
rename set_ready() -> schedule()
2017-03-05 15:08:52 +01:00
Oliver Kowalke
98bd3a8fb4
renaming of memberfunctions of continuation
2017-03-05 10:43:18 +01:00
oliver Kowalke
c3ebe62cd4
use scheduler from active cotnext if joining
...
- use scheduler from active-context in context::join()
- the fiber that will be joined might be already terminated
while active-fiber tries to join
2017-03-03 14:40:49 +01:00
oliver Kowalke
4ced902a32
protect posting ready fiber to remote scheduler
...
- without spinlock in scheduler::set_remote_ready()
the scheudler might termiante (~scheduler()) while
another thread invokes scheduler::set_remote_ready()
2017-03-03 13:30:08 +01:00
oliver Kowalke
c7a6bae2e3
remove macro
2017-03-03 09:48:57 +01:00
oliver Kowalke
842cbd5fff
context::scheduler_ memory-order for load/store
2017-02-27 08:55:26 +01:00
oliver Kowalke
1646a66b1f
fix dequeuing context' from remote-ready-queue
2017-02-27 08:45:32 +01:00
Oliver Kowalke
fa95e9740f
code re-formating
2017-02-26 20:22:58 +01:00
Oliver Kowalke
5f909cac14
remove compiler warning related to unused variable
2017-02-26 17:31:57 +01:00
Oliver Kowalke
bf0791e2fd
fix assertions for link-state
2017-02-26 17:23:19 +01:00
Oliver Kowalke
2aaa869366
remove scheduler::get_next_()
2017-02-26 14:49:50 +01:00