Commit Graph

35 Commits

Author SHA1 Message Date
Jacek Sieka a0d21adef0
Update taskpools/chase_lev_deques.nim
Co-authored-by: Etan Kissling <etan@status.im>
2024-01-02 14:22:33 +01:00
Jacek Sieka a42345a469
Merge branch 'stable' into gc 2024-01-02 14:20:42 +01:00
Jacek Sieka 7c0395cf22
Update taskpools/chase_lev_deques.nim
Co-authored-by: Mamy Ratsimbazafy <mamy_github@numforge.co>
2023-10-24 12:17:41 +02:00
Etan Kissling 15e23ef1cf
bump nimble (#35)
Set Nimble package version to `0.0.5`.
2023-08-07 23:45:08 +00:00
Jacek Sieka ffba691216
fix Flowvar allocation (#33)
* fix Flowvar allocation

* flowvar was allocating the wrong size for the spsc channel
* refactor channel to use an ordinary type for its buffer simplifying
construction / allocation, remove 256-byte limitation
* fix under-aligned allocation in channel test
2023-07-25 18:58:30 +03:00
Jacek Sieka cd6a2ad372
Merge branch 'stable' into gc 2023-07-05 12:01:59 +02:00
Jacek Sieka 2067764521
fork std/tasks, stricter exceptions (#34) 2023-07-05 11:46:36 +02:00
tersec 5551f10490
remove Nim 1.2 and Nim 1.4 support (#32)
* remove Nim 1.2 and Nim 1.4 support

* re-add std/tasks shims

* remove shim again
2023-06-27 09:45:06 +00:00
Andreas Rumpf 7929634fad
fixes #23 (#31) 2023-05-21 22:29:05 +03:00
Mamy Ratsimbazafy 4774e94c61
Add a garbage collector to task queue
The per-threadtask queues grows if it can not fit all pending tasks in queue but never release the extra memory buffer.

In practice it should have no impact on Nimbus, it would require a task to `spawn`a lot of tasks to fill the default queue (32 tasks) and on Nimbus it is only used for parallelizing batch signature verification, which spawns as many tasks as there are cores.
2023-02-06 16:57:28 +01:00
Mamy Ratsimbazafy 4bc0b592e8
Add setup/lock files (#18) (#28)
Co-authored-by: Ivan Yonchovski <yyoncho@users.noreply.github.com>
2023-01-12 11:29:28 +01:00
Jacek Sieka 89d693d3ff
ci: bump checkouts 2022-11-22 17:20:49 +01:00
Jacek Sieka ecfe8954c6
fix push CI push branches 2022-11-22 06:44:53 +01:00
Jacek Sieka b3673c7a7a
normalise nimble (#25)
* normalise nimble

* bump version too

* better ci cancell
2022-11-21 19:56:12 +01:00
ringabout 74ae5a71fa
patches for stricteffects (#24) 2022-11-21 18:02:17 +01:00
Jacek Sieka 17e8479a74
Abi fields byref (#21)
* barriers: add abi fields

...allowing compile-time sizeof discovery

* `bycopy`

* barrier init actually takes a barrier attr

* use byref for barrier

* note mapping safety issues

* add PR link
2022-07-20 09:55:42 +02:00
Jacek Sieka d74d4afadc
Merge pull request #16 from status-im/stylecheck
enable `styleCheck:usages`
2022-04-07 08:28:50 +02:00
Jacek Sieka c8d2af1ced
relax style check to please nim 1.6 2022-04-06 15:34:19 +02:00
Jacek Sieka 2fb9bf9cc6
enable `styleCheck:usages` 2022-04-06 14:30:09 +02:00
Ștefan Talpalaru 8d408ac6cf
bump version (#14) 2022-02-08 14:30:16 +01:00
Mamy Ratsimbazafy 0a76551afa
Re-expose tp.numThreads (#13)
Necessary for nim-blscurve batch sizing: https://github.com/status-im/nim-blscurve/blob/dad2041/blscurve/bls_batch_verifier.nim#L250
2022-02-08 11:55:31 +01:00
Mamy Ratsimbazafy b31b891f11
clarify GCs 2022-01-17 17:39:25 +01:00
Mamy Ratsimbazafy 12752b9e5e
Docs (#8) 2022-01-16 18:33:43 +01:00
Mamy Ratsimbazafy 79c18d7c94
Polish (#7)
* add fibonacci bench https://github.com/status-im/nim-taskpools/issues/5

* unify allocs, don't use a mix of calloc malloc and wv_alloc

* Chase-Lev Deque: "unlimited" growth

* Remove affinity / CPU pinning support: does not work for ARM (Big.Little Arch), macOS, Alder Lake (P and E cores) and multiple instances of a program get the main thread pinned on the same core.

* Remove weave-specific things: WV_NUM_THREADS, the design-by-contract asserts

* avoid running destructors on freshly allocated tasks on Nim 1.6
2022-01-16 08:57:06 +01:00
Ștefan Talpalaru 26e3b1e15b
Nim-1.6 support (#4)
* Nim-1.6 support

* macOS fix
2022-01-03 02:31:43 +01:00
Mamy Ratsimbazafy d0fc9cb4ab Remove destructors from Nim 1.2 2021-09-29 11:20:02 +02:00
Mamy Ratsimbazafy e1fa0ec097 ensure task destructor is run 2021-09-29 10:47:08 +02:00
Mamy Ratsimbazafy 176656044b
rename to pinThreadsToCores 2021-09-21 11:06:11 +02:00
Mamy Ratsimbazafy 2eb22c61b3
Don't make pinToCPU default.
Causes issues when multiple nimbus single-threaded instances are launched on the same machine
2021-09-21 10:54:13 +02:00
Mamy Ratsimbazafy 39b90fa4a3
Add CI (#1)
* Add CI

* fix windows dlls and nightly->devel (how to pull the nightlies?)

* Nim devel csources are broken due to  /nim/config/nim.cfg(16, 1) Error: invalid command line option: '--hint'

* some benches requires POSIX

* deactivate depth-first search bench on Windows

* rename workflow

* mistake in skipping DFS on windows

* Fix aligned allocation requirements
2021-07-01 20:24:50 +02:00
Mamy André-Ratsimbazafy a1e350094b
Setup tests 2021-07-01 10:51:35 +02:00
Mamy André-Ratsimbazafy 1f7f2dfe01
don't print debug info 2021-06-29 17:46:06 +02:00
Mamy André-Ratsimbazafy b57bb8b606
make numThreads public 2021-06-29 17:25:10 +02:00
Mamy André-Ratsimbazafy 23e396bf30
Add license, .nimble, allow usage on 1.2.x 2021-06-29 16:49:53 +02:00
Mamy André-Ratsimbazafy 216aabe629
initial commit 2021-06-28 16:47:06 +02:00