|
|
Subscribe / Log in / New account

Restartable sequences and ops vectors

Restartable sequences and ops vectors

Posted Oct 31, 2017 16:04 UTC (Tue) by ymanton (guest, #85973)
In reply to: Restartable sequences and ops vectors by daney
Parent article: Restartable sequences and ops vectors

That would depend on how expensive the entry/exit of a restartable sequence is. The details in this article and in 697979 seem to imply that some setup is required, where as with LL/SC you simply start your sequence with an LL and end it with an SC. What you're loading/storing doesn't even matter, doesn't have to be shared, may as well be a stack location, so the overhead for this scheme is nothing more than the cost of the LL/SC itself.


to post comments

Restartable sequences and ops vectors

Posted Oct 31, 2017 16:07 UTC (Tue) by josh (subscriber, #17465) [Link] (2 responses)

You set up a restartable sequence *once*, and then use it as many times as you want. Once set up, a restartable sequence has zero overhead unless preempted.

Restartable sequences and ops vectors

Posted Oct 31, 2017 16:45 UTC (Tue) by ymanton (guest, #85973) [Link] (1 responses)

Maybe I'm not looking at the right code, but the patches linked to 697990 here (https://lwn.net/Articles/697990/#do_rseq) appear to have non-trivial entry/exit sequences.

Restartable sequences and ops vectors

Posted Oct 31, 2017 17:49 UTC (Tue) by compudj (subscriber, #43335) [Link]

I'm doing changes based on Andy's feedback from last week (removing the event_counter). I'm done for x86 32/64, currently targeting other architectures. See <https://github.com/compudj/linux-percpu-dev/blob/rseq/dev...> for the work-in-progress fast-path code. There are significant changes to the user-space libraries since my RFC 3-4 weeks ago. It cleans up the interface, and makes it identical to the slowpath cpu_opv fallback API, which is a very good thing.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds