LWN: Comments on "Bringing restartable sequences out of the niche" https://lwn.net/Articles/1033955/ This is a special feed containing comments posted to the individual LWN article titled "Bringing restartable sequences out of the niche". en-us Thu, 30 Oct 2025 15:53:16 +0000 Thu, 30 Oct 2025 15:53:16 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net I missed something about abort https://lwn.net/Articles/1034878/ https://lwn.net/Articles/1034878/ corbet Yes, a system call can result in those things. As an extreme example, think of a <tt>read()</tt> call that has to wait for data to be brought in from disk; that will result in the calling thread losing access to the CPU indefinitely. But almost any system call can result in preemption and/or migration of the calling thread. Sun, 24 Aug 2025 18:42:04 +0000 I missed something about abort https://lwn.net/Articles/1034875/ https://lwn.net/Articles/1034875/ ssmith32 <div class="FormattedComment"> Maybe more succinct: can a system call trigger what the retart code considers "an event" ( pre-emption, interrupt, cpu migration) ?<br> <p> I assume the answer is "possibly", in which case the code loops infinitely. But wondering if I'm misunderstanding.<br> </div> Sun, 24 Aug 2025 18:02:46 +0000 I missed something about abort https://lwn.net/Articles/1034874/ https://lwn.net/Articles/1034874/ ssmith32 <div class="FormattedComment"> So there's this:<br> <p> "the kernel will handle a system-call return in the same way as an interrupt return: if the thread is running in a critical section and an event has occurred, control will be redirected to the abort handler. "<br> <p> And this:<br> <p> " If the current instruction pointer lies within the critical section, the kernel will cause execution to jump to the abort address. The thread can then clean up after its aborted attempt and restart the operation. "<br> <p> What's "if an event occurred"?<br> <p> I read this as saying invoking a system call in a critical section results in the abort handler being called.. which restart the sequence, which would seem to be a bit (infinite) loopy.<br> <p> But the rest of the article seems to imply the current (pre-tglx) code inadvertently works on non-debug kernels.<br> <p> So I missed something, probably obvious.. but I can't sort out what.<br> <p> </div> Sun, 24 Aug 2025 17:57:57 +0000 Followup series https://lwn.net/Articles/1034858/ https://lwn.net/Articles/1034858/ corbet For the curious: Thomas Gleixner has posted <a href="https://lwn.net/ml/all/20250823161326.635281786@linutronix.de/">a followup series</a> fixing another set of problems and offering some strong commentary on the situation as a whole. Sat, 23 Aug 2025 18:42:45 +0000 If this threatens a userspace (meaning glibc in particular) change ... https://lwn.net/Articles/1034818/ https://lwn.net/Articles/1034818/ comex <div class="FormattedComment"> macOS does do runtime checks based on compatibility versions, but it also does something more sophisticated.<br> <p> There's a compiler flag to specify the minimum OS version you need to run on. Meanwhile, every declaration in every system header is marked with a minimum OS version, so you get an error if you accidentally use a newer function (this can be disabled for functionality you want to use conditionally). In more subtle cases, header files can manually check the target version with #if and change their behavior, though this is rarely done.<br> <p> The goal is that you can always use the latest SDK, even if you are targeting an old OS version (though there is a limit to how far back you can go).<br> <p> I think glibc would be well-served if it adopted a similar scheme.<br> </div> Sat, 23 Aug 2025 01:42:49 +0000 Please Rewrite Glibc RWlock or Revert to Drepper's Good Old Implementation. https://lwn.net/Articles/1034714/ https://lwn.net/Articles/1034714/ PengZheng <div class="FormattedComment"> <span class="QuotedText">&gt; Mathieu Desnoyers (the creator of this feature) has been advocating for increased use of it within glibc to improve scalability for some time. </span><br> <p> I would once again propose the buggy rwlock([1]), which is a complicated mess, as a rewrite candidate.<br> <p> [1] <a href="https://sourceware.org/bugzilla/show_bug.cgi?id=31477">https://sourceware.org/bugzilla/show_bug.cgi?id=31477</a><br> </div> Fri, 22 Aug 2025 03:02:55 +0000 If this threatens a userspace (meaning glibc in particular) change ... https://lwn.net/Articles/1034711/ https://lwn.net/Articles/1034711/ quotemstr <div class="FormattedComment"> People look to glibc for inspiration on how to use symbol versions in general, and what glibc does is wrong and broken. And no, "just compile on an old docker image" isn't a solution either: what if I want to write a program that *conditionally* uses new functionality? If I compile against old glibc headers, I don't see definitions of the new functionality. If I compile against new glibc headers, I can't run on older systems. The whole situation sucks. The whole problem is avoided by simply not overloading function by version.<br> <p> How do you solve the problem of shipping bugfixes that might break older versions e.g. the infamous memcpy direction problem? Use what macOS, Windows, and Android do: compatibility versions embedded in the binary manifest.<br> </div> Fri, 22 Aug 2025 00:43:12 +0000 If this threatens a userspace (meaning glibc in particular) change ... https://lwn.net/Articles/1034710/ https://lwn.net/Articles/1034710/ intelfx <div class="FormattedComment"> <span class="QuotedText">&gt; glibc refuses to provide a preprocessor macro for targeting older systems</span><br> <p> Perhaps this is a glibc problem rather than a symbol versioning problem?<br> </div> Fri, 22 Aug 2025 00:29:57 +0000 If this threatens a userspace (meaning glibc in particular) change ... https://lwn.net/Articles/1034709/ https://lwn.net/Articles/1034709/ quotemstr <div class="FormattedComment"> I wish people wouldn't use ELF symbol versioning. It causes problems the moment you step off of the narrow path of running old binaries AOT-compiled native-code on new systems.<br> <p> What happens if you call dlsym? What happens if you try to build a program on a new system targeting an old one and pick up the new symbol without realizing it? (glibc refuses to provide a preprocessor macro for targeting older systems.) <br> <p> Much better to give new functions new names. Don't add a symbol version my_api@2. Just define a my_api2(). It looks uglier in the short term, sure, but saves everyone trouble in the end.<br> </div> Fri, 22 Aug 2025 00:17:27 +0000 If this threatens a userspace (meaning glibc in particular) change ... https://lwn.net/Articles/1034690/ https://lwn.net/Articles/1034690/ davecb <div class="FormattedComment"> ... glibc is one of the Linux users of versioned interfaces.<br> <p> Ask them how to support an abi change by versioning the interface that changed, using linker symbols. High-level (and oversimplified!) view in <a href="https://leaflessca.wordpress.com/2018/05/31/an-alternative-to-mvs/">https://leaflessca.wordpress.com/2018/05/31/an-alternativ...</a>, and the real details in David J Brown's proposal, <a href="https://www.usenix.org/legacy/publications/library/proceedings/als00/2000papers/papers/full_papers/browndavid/browndavid_html/">https://www.usenix.org/legacy/publications/library/procee...</a><br> </div> Thu, 21 Aug 2025 16:43:33 +0000