0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-15 14:31:11 +01:00
Commit graph

297 commits

Author SHA1 Message Date
Jason Volk
29e7fa3515 ircd::ctx: Use closure for continuation. 2018-12-22 21:03:14 -08:00
Jason Volk
37ba013413 ircd::ctx: Simplify continuation; eliminate to_asio derived type. 2018-12-22 20:11:00 -08:00
Jason Volk
365cf865d0 ircd::ctx: Various improvements/reorg of continuation/to_asio. 2018-12-22 17:24:48 -08:00
Jason Volk
d5ffc6b0de ircd::ctx: Improve prof related; add full ticker of counters. 2018-12-22 15:17:18 -08:00
Jason Volk
a590ad1a03 ircd::ctx: Another attempt at using continuation dtor as an interruption point. 2018-12-22 13:36:48 -08:00
Jason Volk
0ed9382db0 ircd::ctx: Reorder the interruption point conditional branches. 2018-12-22 13:19:02 -08:00
Jason Volk
b5f4aeb67d ircd::ctx: Assert ctx dtor isn't called while running. 2018-12-22 13:04:02 -08:00
Jason Volk
48b50acab2 ircd::ctx: Cleanup and recondition stack-protect related. 2018-12-22 13:04:02 -08:00
Jason Volk
08c940d0df ircd::ctx: Use better interruption check; remove func condition. 2018-12-21 18:22:44 -08:00
Jason Volk
5e196ce0ac ircd::ctx: Emit stack_protect in some places. 2018-12-21 17:18:41 -08:00
Jason Volk
f9ee616a9a ircd::ctx::prof: Use a profile instance as a totals counter. 2018-12-21 11:55:43 -08:00
Jason Volk
67e6d363db ircd::ctx: Add interruption point before yield to asio. 2018-12-20 14:21:48 -08:00
Jason Volk
9d7a53ae49 ircd::ctx: Move resume-interruption point to this_ctx::wait() suite. 2018-12-20 13:27:21 -08:00
Jason Volk
ddfafd45e2 ircd::ctx: Exempt SLICE_EXEMPT contexts from slice_usage_warning. 2018-12-18 18:10:06 -08:00
Jason Volk
a7b2f76c11 ircd::ctx: Add slice_usage_warning device. 2018-12-17 16:20:53 -08:00
Jason Volk
4686139f8e ircd::ctx: Rework the prof stack to make a public test interface. 2018-12-17 15:24:41 -08:00
Jason Volk
2c713cc9a5 ircd::ctx: Tweak interruption point to asio; add comments. 2018-12-17 12:16:04 -08:00
Jason Volk
ba10948e9d ircd::ctx: Move principal interruption point into continuation. 2018-12-16 18:37:51 -08:00
Jason Volk
2a23d9e6dd ircd::ctx: Add more interface access to pool/queue; various cleanup. 2018-12-16 16:27:11 -08:00
Jason Volk
72859c650b ircd::ctx: Convert various name character strings to string_view. 2018-12-16 16:27:11 -08:00
Jason Volk
98cb7693f3 ircd::ctx: Set context to NOINTERRUPT rather than clearing TERMINATED like an INTERRUPTED. 2018-12-15 18:18:00 -08:00
Jason Volk
7471bf54f4 ircd::ctx: Improve/conform some watchdog log messages. 2018-12-15 18:18:00 -08:00
Jason Volk
a3613b1f4c ircd::ctx: Don't persist conf items for slice/stack assertions. 2018-12-13 16:25:42 -08:00
Jason Volk
399198deac ircd::ctx: Add flags for slice and stack usage watchdog exemption. 2018-12-13 16:21:54 -08:00
Jason Volk
3df645fcfb ircd::ctx: Improve some prof log messages. 2018-12-13 15:19:26 -08:00
Jason Volk
41602087f4 ircd::ctx: Simplify flags type; fix flags test. 2018-12-07 12:45:05 -08:00
Jason Volk
4a2ad1c186 ircd::ctx: Reorg continuation for core wakeup conditions. 2018-12-07 12:31:30 -08:00
Jason Volk
9eabd745f5 ircd::ctx: Minor cleanup. 2018-12-07 12:03:25 -08:00
Jason Volk
418bbc0441 ircd::ctx: Minor simplify type elaborations. 2018-12-07 11:01:16 -08:00
Jason Volk
3af70e75c3 ircd::ctx: Minor cleanup / struct packing / type. 2018-12-07 10:13:29 -08:00
Jason Volk
caa92a98c3 ircd::ctx: Don't execute an interrupt handler for uninterruptible ctx. 2018-12-06 19:07:36 -08:00
Jason Volk
bacfa6de95 ircd::ctx: Assert interruption points aren't useless calls. 2018-12-06 19:04:31 -08:00
Jason Volk
c74debac01 ircd::ctx: Cleanup / fixes for critical assertion related. 2018-11-29 16:12:33 -08:00
Jason Volk
46690f433c ircd::ctx: Condition rdtsc linkage based on x86intrin availability. 2018-11-14 18:45:10 -08:00
Jason Volk
48a15e026b ircd::ctx::prof: Convert the settings into conf items. 2018-11-14 18:45:10 -08:00
Jason Volk
9222de0b34 ircd::ctx: Add access to rdtsc through ctx::prof; minor comments. 2018-11-14 16:55:46 -08:00
Jason Volk
bbe676a392 ircd::ctx: Split this_ctx devices into files; minor interface tweaks. 2018-11-11 14:13:37 -08:00
Jason Volk
7c815116a6 ircd::ctx: Fix comment typo. 2018-11-06 19:48:06 -08:00
Jason Volk
a91cdeec0c ircd::ctx: Reorg / abstract / deinline promise related. 2018-10-30 12:18:16 -07:00
Jason Volk
e6dd4beaaa ircd::ctx: Harder default interruption on context dtor. 2018-10-23 10:16:15 -07:00
Jason Volk
3ffb91d0fd ircd::ctx: Deinline to_asio continuation ctor. 2018-10-21 01:09:07 -07:00
Jason Volk
02f64c7f34 ircd: Add ios unit to provide a more central control point for asio. 2018-10-17 05:12:10 -07:00
Jason Volk
0e7a55d3b3 ircd::ctx::pool: Use queue push() instead of emplace(). 2018-09-18 21:56:36 -07:00
Jason Volk
5698637dd6 ircd::ctx::pool: Use ctx::queue for pool's queue. 2018-09-18 16:45:04 -07:00
Jason Volk
7d94b1c17b ircd: Relax noexcept in std::function template declarations. 2018-09-13 05:12:25 -07:00
Jason Volk
76e48b3ef3 ircd::ctx: Test for valid then() before calling from here. 2018-08-28 18:58:09 -07:00
Jason Volk
a4e4424ede ircd: Improve main control flow for termination condition during init. 2018-08-28 15:04:23 -07:00
Jason Volk
2a11c33c9f ircd::ctx: More list assertions. 2018-08-27 01:45:31 -07:00
Jason Volk
edbc0984c5 ircd::ctx: Linkage for default and move semantics of ctx::context. 2018-08-26 20:46:59 -07:00
Jason Volk
6cdb1bba63 ircd::ctx: Add pool::set convenience. 2018-08-22 14:37:40 -07:00
Jason Volk
7fb2a825a1 ircd::ctx: Minor cleanup. 2018-08-21 08:10:37 -07:00
Jason Volk
57ea362daa ircd::ctx: Fix stale comment. 2018-08-21 04:57:36 -07:00
Jason Volk
85d4a4f5ed ircd::ctx: Further tweak interruption masking semantics. 2018-08-19 20:11:41 -07:00
Jason Volk
ff66bc441c ircd::ctx: Stack uninterruptible's gracefully; assume context. 2018-08-19 20:11:41 -07:00
Jason Volk
10434c96c5 ircd::ctx: Consistent use of interruption. 2018-08-19 18:29:46 -07:00
Jason Volk
38c5679b5a ircd::ctx: Use terminate() rather than interrupt() during ~context(). 2018-08-19 18:18:15 -07:00
Jason Volk
1492770f6b ircd::ctx: Various minor fixes. 2018-08-19 18:09:04 -07:00
Jason Volk
ccf5b79e6a ircd::ctx: Allow this_ctx::interruption toggle to no-op if no ctx. 2018-08-19 17:43:25 -07:00
Jason Volk
b796668a77 ircd::ctx: Minor movement/cleanup. 2018-08-19 16:21:33 -07:00
Jason Volk
f4a4674daa ircd::ctx::pool: Add a terminate(); cleanup del(). 2018-08-19 15:55:35 -07:00
Jason Volk
141f4e1c0a ircd::ctx: Move this branch condition. 2018-08-17 21:31:54 -07:00
Jason Volk
fe69a41255 ircd::ctx::pool: Fix dtor; use terminate() rather than interrupt(). 2018-08-17 12:51:49 -07:00
Jason Volk
c8902654a0 ircd::ctx: Detach context in dtor on main/async stacks. 2018-05-28 07:04:06 -07:00
Jason Volk
5b52ac3103 ircd::ctx: Remove argument from continuation ctor. 2018-05-25 23:50:20 -07:00
Jason Volk
3746c25f20 ircd::ctx::ole: Add crude pooling. 2018-05-25 20:21:36 -07:00
Jason Volk
956c67beca ircd::ctx: Use dock for better adjoindre semantics. 2018-05-22 18:06:18 -07:00
Jason Volk
f68f3bbb9c ircd::ctx: Organize stack and profile related into specific structures. 2018-05-22 18:03:18 -07:00
Jason Volk
0e169fe4a4 ircd::ctx: Stop interrupt propagation at pool function base. 2018-05-22 05:49:38 -07:00
Jason Volk
d901257745 ircd::ctx: Use NOINTERRUPT flag for termination suppression as well. 2018-05-22 00:24:48 -07:00
Jason Volk
f17f9685ec ircd::ctx::ole: Use interrupt suppression scope while offloaded. 2018-05-22 00:22:57 -07:00
Jason Volk
7e8ec1ca63 ircd::ctx: Support interrupt suppression; suite. 2018-05-22 00:22:56 -07:00
Jason Volk
5000397f12 ircd::ctx: Fix erroneous comment. 2018-05-07 12:37:44 -07:00
Jason Volk
e15ac0d1d3 ircd::ctx: Add state for counting context switches. 2018-05-07 12:36:33 -07:00
Jason Volk
003ecf6357 ircd: Remove / update various ctx::interrupted catch blocks for ctx::terminated. 2018-05-06 02:06:08 -07:00
Jason Volk
48055cb276 ircd::ctx: Add special termination interruption to yanagiba the stack. 2018-05-06 02:06:08 -07:00
Jason Volk
1059688d02 ircd::ctx: Add state for stack usage profiling; clarify some interfaces. 2018-05-05 23:14:11 -07:00
Jason Volk
f55304e0a1 ircd::ctx: Add slice total counter; move check_stack after timing sample. 2018-05-05 22:42:25 -07:00
Jason Volk
ea42490b4e ircd::ctx: Consolidate slice timing to tsc; add public interfacing. 2018-05-05 22:24:25 -07:00
Jason Volk
ec0153c4da ircd::ctx: Split into internal header. 2018-05-05 21:24:17 -07:00
Jason Volk
0f161f98e8 ircd::ctx::list: Fix misleading reference. 2018-04-28 03:26:07 -07:00
Jason Volk
dc5ac7c2ac ircd::ctx: #ifdef away linkages for ctx assertions in NDEBUG builds. 2018-04-27 19:16:56 -07:00
Jason Volk
09c282fd8e ircd::ctx: Add stack_usage_assertion; move stack_usage_here() into this_ctx::. 2018-04-27 19:09:26 -07:00
Jason Volk
2a7cb42c98 ircd::ctx: Minor ctx object semantic elaboration. 2018-04-20 00:44:45 -07:00
Jason Volk
1dcfff91a5 ircd::ctx: Expose stack_max() to public interface. 2018-04-19 21:42:54 -07:00
Jason Volk
35a1c62b1f ircd::ctx: Add ctx::running()/waiting() for interface completeness. 2018-04-19 21:42:54 -07:00
Jason Volk
3b32d2170e ircd::ctx: Give ctx::ctx the instance_list. 2018-04-19 21:42:54 -07:00
Jason Volk
281a9e1cfd ircd::ctx: Place ctx::list node pointers into structure in ctx. 2018-04-19 21:42:54 -07:00
Jason Volk
793c24ce9e ircd::ctx: Simplify list iteration API. 2018-04-19 14:47:56 -07:00
Jason Volk
fb6a4fc6ac ircd::ctx: Bypass the exception_handler assertion if on bare metal. 2018-04-07 11:08:07 -07:00
Jason Volk
7995c20c50 ircd::ctx::pool: Change dispatching from notify_one() to notify(). 2018-04-04 22:54:58 -07:00
Jason Volk
f07eed2ab9 ircd::ctx: Relax the assertion for uncaught exceptions on context switch. 2018-03-28 14:11:33 -07:00
Jason Volk
c6b9c06302 ircd::ctx: Avoid any possible ambiguities with location of *current. 2018-03-26 23:29:57 -07:00
Jason Volk
a2eb756548 ircd::ctx: Split this_ctx:: from ctx.h; minor reorg. 2018-03-25 02:04:42 -07:00
Jason Volk
441a692dfc ircd::ctx: Device to allow context switching in exception handler. 2018-03-24 18:00:04 -07:00
Jason Volk
7dbfb061e9 ircd::ctx: Assert no yielding during exception handling due to ABI limitations. 2018-03-24 15:53:15 -07:00
Jason Volk
db8810e397 ircd::ctx: Integrate custom interruption action. 2018-03-23 22:17:10 -07:00
Jason Volk
4211671698 ircd::ctx: Reason about exception propagation at stack base; minor cleanup. 2018-03-16 21:42:22 -07:00
Jason Volk
3810b8d57f ircd: Various exception assertions; minor cleanup. 2018-03-15 22:25:16 -07:00
Jason Volk
a48426e25d ircd/modules: Migrate some log messages to new facilities. 2018-03-15 22:25:16 -07:00
Jason Volk
f7ecc4342b ircd::ctx: Avoid any alloc for current reassertion on spawn. 2018-03-12 15:44:55 -07:00
Jason Volk
353ee9b80d ircd::ctx: Spawn OLE thread lazily. 2018-02-07 12:16:17 -08:00
Jason Volk
230eb3fc7a ircd::ctx::prof: Consistent warning message strings. 2018-02-05 21:24:36 -08:00
Jason Volk
69427d7e43 ircd::ctx: Enable ctx::prof on debug builds only. 2018-02-05 21:24:35 -08:00
Jason Volk
3ba527079b ircd::ctx: Sample rdtsc to complement profile warning output. 2018-02-05 21:24:35 -08:00
Jason Volk
be624ca7f6 Update Copyrastafaris. 2018-02-05 21:24:34 -08:00
Jason Volk
fd2a7974e8 ircd: Minor cleanup; comments; spacing. 2018-01-26 19:27:12 -08:00
Jason Volk
8f3483391e ircd: Minor log suppressions via comment. 2018-01-17 21:38:17 -08:00
Jason Volk
df0e59a5e0 ircd::ctx: Add custom intrinsic list structure for contexts. 2018-01-13 23:45:36 -08:00
Jason Volk
1ddf0f546a ircd: Update various comments / documentation. 2017-12-12 14:59:40 -07:00
Jason Volk
ae289de529 ircd::ctx: Improve the pool counters. 2017-11-30 11:23:46 -08:00
Jason Volk
c16a6e8baa ircd::ctx: Adjust prof defaults; minor cleanup. 2017-11-30 11:23:43 -08:00
Jason Volk
99e431c8da ircd::ctx: Further fix and clarify the POST/DETACH leak potential. 2017-11-30 11:23:42 -08:00
Jason Volk
26800d5db4 ircd::ctx: Improve the spawn sequence to avoid complications. 2017-11-30 11:23:42 -08:00
Jason Volk
32e0d3c5df ircd::ctx: Improve spawning; fix bug. 2017-11-30 11:23:41 -08:00
Jason Volk
c157967559 irct::ctx: Add this basic pool debug. 2017-10-19 00:58:43 -07:00
Jason Volk
124f7ea12a ircd::ctx: Add utils for getting this_ctxt name and id; truncate default name literal. 2017-10-15 21:12:58 -07:00
Jason Volk
e3963da007 ircd: Various comments added/modified. 2017-10-11 18:18:20 -07:00
Jason Volk
eb56befef0 ircd: Improve thread id related; add public functions to post to ios. 2017-10-11 18:18:19 -07:00
Jason Volk
19451ab914 ircd::ctx: shared_mutex; peek / view / shared_view; fixes. 2017-10-03 04:17:10 -07:00
Jason Volk
c4a6addd5a ircd::ctx: Add critical_assertion debugging tool. 2017-10-03 04:17:08 -07:00
Jason Volk
b309793ed0 ircd::ctx: Add some docs; minor cleanup. 2017-10-03 04:17:07 -07:00
Jason Volk
b207b9e909 ircd: Rename ircd::scope to ircd::unwind. 2017-09-24 18:16:41 -07:00
Jason Volk
7f548cee1c ircd: Make asio header; comments; add special continuation for yielding to asio. 2017-09-24 18:16:39 -07:00
Jason Volk
1acd278632 ircd::ctx: Updates; add ctx::view; add preliminary ctx::fault; various reorg. 2017-09-24 18:16:38 -07:00
Jason Volk
6cd58b0d6a ircd: Update various comments / minor cleanup. 2017-09-24 18:16:32 -07:00
Jason Volk
f98be1582d ircd::ctx: Expose stack usage functions to user. 2017-09-08 03:47:50 -07:00
Jason Volk
d9a4f06bf6 ircd: Employ namespace scope extensions from c++1z/gnu++14.
This is not a move to c++17. If the compiler happens to have support
for c++17 namespace scope resolution, they have been kind enough to
backport it to gnu++14. This limits our support for really old c++14
compilers, but that was limited anyway. GCC 6.1 and clang 3.6 tested.
2017-09-08 03:47:46 -07:00
Jason Volk
b6d51b89dd ircd::ctx: Patch issues with direct jump. 2017-08-23 15:52:15 -06:00
Jason Volk
a880e2e43e ircd::ctx: Add minor commentary. 2017-08-23 14:59:27 -06:00
Jason Volk
b579d7dfc3 ircd::ctx: Add strand()/notify() with threadsafe_t. 2017-04-02 20:52:30 -07:00
Jason Volk
e4f258314a fixup! ircd::ctx: Fixes for the thread-unsafety of asio::steady_timer. 2017-03-30 21:14:59 -07:00
Jason Volk
33b2cd8f70 ircd::ctx: Fixes for the thread-unsafety of asio::steady_timer. 2017-03-30 16:04:19 -07:00
Jason Volk
c604b391be ircd::ctx: Support direct context switching without enqueueing with ios. 2017-03-30 16:04:19 -07:00
Jason Volk
d9521c4dc0 ircd::ctx: Fix bug where interrupts are lost before context spawns. 2017-03-30 16:04:19 -07:00
Jason Volk
31dd925b17 ircd::ctx: Mark the profiling leave time directly after the user finishes. 2017-03-30 16:04:19 -07:00
Jason Volk
adf408d4b0 ircd::ctx: Tweak default profiling values; fix fmt:: specifier. 2017-03-20 00:01:42 -07:00
Jason Volk
b592b69b86 What is the Matrix? Control. 2017-03-10 17:51:18 -08:00
Jason Volk
859f464698 ircd::ctx: Set the SELF_DESTRUCT flag on context::detach(). 2016-11-13 16:32:37 -08:00
Jason Volk
2f645941a8 ircd::ctx: Move ctx headers into directory. 2016-11-13 16:29:45 -08:00
Jason Volk
e6c8025ae0 ircd::ctx: Add yield() allowing other contexts to run before returning. 2016-11-13 16:29:45 -08:00
Jason Volk
bbd73746c3 ircd::ctx: Abstract the db::work subsystem into ctx::ole OffLoad Engine (OLE). 2016-09-27 17:28:24 -07:00
Jason Volk
2251595551 ircd::ctx: Add preliminary profiling system to mitigate silent degradation.
This system alerts the developer when something blocks a context from yielding
for too long or exceeds stack usage limits. More profiling can be added for
further optimization.
2016-09-27 17:27:48 -07:00
Jason Volk
f7f9d87df0 ircd::ctx: Add context pool. 2016-09-23 00:01:00 -07:00
Jason Volk
e2d115a97a ircd::ctx: Add sleep() suite, or a wait() which ignores notification. 2016-09-22 16:18:32 -07:00
Jason Volk
89c2e74f3b ircd::ctx: Improve context interface. 2016-09-21 16:29:26 -07:00
Jason Volk
d2bb8cd8a7 ircd::ctx: Add primary features to context. 2016-09-21 16:28:49 -07:00
Jason Volk
249ba02faa Introduce userspace contexts. 2016-09-09 16:17:36 -07:00