4 ms·
That took nearly 3 years to get merged: https://lwn.net/Articles/650333/ https://lwn.net/Articles/650333/
by wahern 8y ago
That took nearly 3 years to get merged: https://lwn.net/Articles/650333/ https://lwn.net/Articles/650333/
- schmichael 8y ago5 years since first presented: https://www.youtube.com/watch?v=KXuZi9aeGTw https://www.youtube.com/watch?v=KXuZi9aeGTw
- wahern 8y agoAre the userland scheduling patches (switchto) in the pipeline?
- schmichael 8y agoIf they are I can't find where...
- ailideex 8y agoI'm not entirely sure this is same thing - but if anybody know where the patches for this is please share - I have tried to contact the presenter to get them but had no success thus far.
- cryptonector 8y agoThat doesn't talk about this, but about a larger set of enhancements (new system calls) for avoiding a bunch of threading/scheduler pathologies.
- taftster 8y agoCould you clarify if you think this is good, bad, or just interesting? Your comment might be received as though a change like this taking three years is somehow not efficient or tsk-worthy.
- schmichael 8y agoI'm not the OP, but I posted the video I remember watching 5 years ago with great interest. I have no basis on which to inform an opinion on whether 5 years is a good or bad period of time to go from an idea to a syscall in the Linux kernel. I just find it interesting as someone who has switched jobs multiple times in 5 years -- much less worked on a single idea that long!
- ebikelaw 8y agoWell, to be fair to the authors, their idea became a system in the linux kernel within Google years ago. It's only the general public that has been deprived of its benefit.
- compudj 8y ago(disclaimer: I am the patch author, Mathieu Desnoyers) Just as a clarification, the idea originates from Google (I give full credits to Paul Turner and Andrew Hunter for it). However, the extra 3 years of work required to get it upstream has been done by myself at EfficiOS.
- pas 8y agoThank you for persevering! Could you elaborate a bit on what had to be done to get it upstream?
- compudj 8y agoSure, before getting it upstream, I had to: - Gather a list of desiderata, ensuring we take into account a complete list of use-cases targeted by everyone active in the rseq discussions. This is crucially important to ensure discussions don't spin in circles going back and forth between different requirements, - Redesign the uapi/linux/rseq.h ABI, making sure a single TLS store is needed to enter a rseq critical section, without requiring any extra registers as ABI. I have introduced the "rseq_cs" structure as critical section descriptor to do this, - Optimize arm32 and x86 rseq critical sections for speed, by creating my own benchmark programs, - Rewrite the kernel rseq implementation a few times so it follows the kernel coding style and ensure it pleases everyone caring about it, - Present 2 talks about rseq at Linux Plumbers Conference, - Go through various rounds of in person, email, and IRC discussions with Paul Turner, Peter Zijlstra, Andy Lutomirski, Boqun Feng, Paul E. McKenney, Thomas Gleixner, Ben Maurer, Linus Torvalds, and many others. Those were very constructive discussions bringing up everyone's concerns with respect to this new system call, - Extend the rseq selftests, adding new testing strategies such as delay loops between "steps" of the critical section, thus increasing the likelihood of generating preemption races, - Figure out nasty races only happening on NUMA systems after about a full day of stress-testing, - Provide solutions for debugger single-stepping "lack of progress" problem if rseq is used when retrying on abort. It's basically the cpu_opv system call I plan to propose for 4.19. Meanwhile, without cpu_opv, rseq can still be used in ways to guarantee forward progress, but the abort code needs to use a partitioning strategy rather than a simple retry (e.g. going to a different memory pool in case of abort for a memory allocator), - Harden the rseq mechanism for security, by adding a "signature" word before the abort label, - Implement prototypes of lttng-ust and liburcu which use rseq, gathering benchmarks to validate the approach, - Write rseq and cpu_opv man pages. And this is just the items that were "forward progress" in the rseq adventure. I'm leaving out everything that were attempts at making things more generic that had to be thrown away.