
I've uploaded a new version of boost.fiber to boost vault. It provides assembler for x86 (32/64bit) - PowerPC and ARM are planed. Performance of the raw context-switch is 6-12 times faster than swapcontext(POSIX). Mutexes, condition- and event-variables suspend fibers waiting on those sync. primitives and can be shared by fiber running on different threads (schedulers).

Hi Oliver, Oliver Kowalke wrote:
I've uploaded a new version of boost.fiber to boost vault.
It provides assembler for x86 (32/64bit) - PowerPC and ARM are planed. Performance of the raw context-switch is 6-12 times faster than swapcontext(POSIX).
Have you implemented this in a way that is interchangeable with swapcontext ? For example, could I take your optimised implementations and use them with e.g. Boost.Coroutine ? If this part of your work could be factored out and used independently, rather than being left as an implementation detail, that would potentially increase the usefulness of the contribution. Also, do you have any observations on why swapcontext is slow? On what platforms have you measured this? If you need any help with ARM I may be able to assist. Regards, Phil.

Am 11.07.2010 18:52, schrieb Phil Endecott:
Have you implemented this in a way that is interchangeable with swapcontext ? For example, could I take your optimised implementations and use them with e.g. Boost.Coroutine ? boost.coroutine would have to use fcontext_t and its functions instead of ucontext_t etc.
Also, do you have any observations on why swapcontext is slow? It does an system call to save the sinal mask.
On what platforms have you measured this? Linux: x86_64 and i386
If you need any help with ARM I may be able to assist. That would be kind - I'm using debian/lenny versatilepb/ARM926EJ-S (virtualized with qemu).
On arm/Linux: Does register r9 have a special purpose or is it used as ordinary general purpose register? Where is the 'thread-related data' stored (thread-informations)? On x86/Linux gs is used; x86/Windows stores a pointer to the TIB in fs. regards, Oliver
participants (2)
-
Oliver Kowalke
-
Phil Endecott