Avi Kivity
beaa5a9117
Merge 'wasm: move compilation to an alien thread' from Wojciech Mitros
...
The compilation of wasm UDFs is performed by a call to a foreign
function, which cannot be divided with yielding points and, as a
result, causes long reactor stalls for big UDFs.
We avoid them by submitting the compilation task to a non-seastar
std::thread, and retrieving the result using seastar::alien.
The thread is created at the start of the program. It executes
tasks from a queue in an infinite loop.
All seastar shards reference the thread through a std::shared_ptr
to a `alien_thread_runner`.
Considering that the compilation takes a long time anyway, the
alien_thread_runner is implemented with focus on simplicity more
than on performance. The tasks are stored in an std::queue, reading
and writing to it is synchronized using an std::mutex for reading/
writing to the queue, and an std::condition_variable waiting until
the queue has elements.
When the destructor of the alien runner is called, an std::nullopt
sentinel is pushed to the queue, and after all remaining tasks are
finished and the sentinel is read, the thread finishes.
Fixes #12904
Closes #13051
* github.com:scylladb/scylladb:
wasm: move compilation to an alien thread
wasm: convert compilation to a future
2023-03-12 19:29:11 +02:00
..
2023-03-07 17:54:53 +08:00
2023-02-15 11:09:04 +02:00
2023-02-28 21:56:53 +08:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-15 11:01:50 +02:00
2023-02-01 20:14:51 -03:00
2023-02-15 11:01:50 +02:00
2023-02-14 11:19:03 +02:00
2023-02-01 20:14:51 -03:00
2023-02-19 21:05:45 +02:00
2023-02-15 11:01:50 +02:00
2023-02-01 20:14:51 -03:00
2023-02-19 12:58:22 +08:00
2023-02-01 20:14:51 -03:00
2023-03-04 13:11:25 +08:00
2023-02-01 20:14:51 -03:00
2023-03-06 13:28:36 +03:00
2023-02-15 11:01:50 +02:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-15 11:01:50 +02:00
2023-02-01 20:14:51 -03:00
2023-02-28 21:56:53 +08:00
2023-02-15 11:01:50 +02:00
2023-02-15 11:01:50 +02:00
2023-02-15 11:01:50 +02:00
2023-02-28 21:56:53 +08:00
2023-02-28 21:56:53 +08:00
2023-03-06 13:28:36 +03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-15 11:09:04 +02:00
2023-02-28 21:56:53 +08:00
2023-02-01 20:14:51 -03:00
2023-03-09 18:31:45 +01:00
2023-02-28 21:56:53 +08:00
2023-02-01 20:14:51 -03:00
2023-03-01 09:58:14 +02:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-15 11:01:50 +02:00
2023-02-28 21:56:53 +08:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-17 07:19:52 +02:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-19 21:05:45 +02:00
2023-02-19 21:05:45 +02:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-28 21:56:55 +08:00
2023-02-15 11:01:50 +02:00
2023-02-15 11:01:50 +02:00
2023-02-28 21:56:53 +08:00
2023-02-15 11:01:50 +02:00
2023-02-28 21:56:53 +08:00
2023-02-28 21:56:53 +08:00
2023-02-28 21:56:53 +08:00
2023-02-28 21:56:53 +08:00
2023-02-15 11:48:24 +02:00
2023-02-15 11:01:50 +02:00
2023-02-19 21:05:45 +02:00
2023-02-14 11:19:03 +02:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-15 11:01:50 +02:00
2023-02-14 11:19:03 +02:00
2023-02-15 11:01:50 +02:00
2023-02-28 21:56:53 +08:00
2023-03-07 08:45:04 +03:00
2023-02-03 19:04:32 +01:00
2023-02-28 21:56:53 +08:00
2023-02-01 20:14:51 -03:00
2023-02-28 21:56:53 +08:00
2023-02-01 20:14:51 -03:00
2023-02-28 21:56:53 +08:00
2023-03-12 14:04:34 +02:00
2023-03-09 08:21:48 +03:00
2023-02-01 20:14:51 -03:00
2023-02-15 11:01:50 +02:00
2023-03-07 17:54:53 +08:00
2023-02-19 21:05:45 +02:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-28 20:04:22 +02:00
2023-02-28 21:56:53 +08:00
2023-03-09 08:21:48 +03:00
2023-03-09 08:21:48 +03:00
2023-02-01 20:14:51 -03:00
2023-03-09 08:21:48 +03:00
2023-02-10 07:11:38 +02:00
2023-02-21 17:42:18 +03:00
2023-03-09 08:21:48 +03:00
2023-02-17 17:58:26 +03:00
2023-02-28 21:56:53 +08:00
2023-03-09 08:21:48 +03:00
2023-03-09 08:21:48 +03:00
2023-02-15 11:01:50 +02:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-15 11:01:50 +02:00
2023-02-01 20:17:16 -03:00
2023-02-15 11:09:04 +02:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-19 21:05:45 +02:00
2023-03-09 17:51:15 +01:00
2023-02-28 21:56:53 +08:00
2023-03-06 12:59:41 +02:00
2023-03-06 13:17:21 +03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-01 20:14:51 -03:00
2023-02-27 15:09:42 +02:00
2023-03-06 13:17:21 +03:00
2023-02-15 11:01:50 +02:00
2023-02-01 20:14:51 -03:00
2023-03-09 11:54:38 +01:00
2023-03-09 11:54:38 +01:00