commit | 429b828e7b72906241698536ae6b797a63c6749c | [log] [tgz] |
---|---|---|
author | Earl Ou <shunhsingou@google.com> | Fri Sep 11 09:21:52 2020 +0800 |
committer | Earl Ou <shunhsingou@google.com> | Wed Sep 16 07:57:40 2020 +0000 |
tree | 9d1942f1b64499909f6a173f4145fadbe36ff2f8 | |
parent | 8864c2ea24e274accdd0562d6854930a7130a325 [diff] |
base: use setjmp to speed up fiber ucontext is an order of magnitude slower compared to most of the fiber implementation, mainly due to the additional signal mask operation. This change applies the trick provided in http://www.1024cores.net/home/lock-free-algorithms/tricks/fibers, which uses _setjmp/_longjmp to switch between contexts created by ucontext. Combine with NodeList improvement, we see 81% speed improvement with the example provided by Matthias Jung: https://gist.github.com/myzinsky/557200aa04556de44a317e0a10f51840 Compared with Accellera's SystemC, gem5 SystemC was originally 10x slower, and with this change it's about 1.8x. Change-Id: I0ffb6978e83dc8be049b750dc1baebb3d251601c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34356 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>