On Wed, Dec 18, 2019 at 02:51:27PM -0800, Linus Torvalds wrote: > On Wed, Dec 18, 2019 at 12:59 PM Josh Triplett wrote: > > Debian and Ubuntu have make 4.2.1-1.2, which includes "[SV 51159] Use a > > non-blocking read with pselect to avoid hangs." and various other fixes. > > https://metadata.ftp-master.debian.org/changelogs/main/m/make-dfsg/make-dfsg_4.2.1-1.2_changelog > > So, both Debian and Ubuntu should be fine with the pipe improvements. > > (I'm testing that now.) I've now tested this, and 4.2.1-1.2 doesn't seem to have the same problem that affects upstream 4.2.1. With Debian and Ubuntu already fixed, and Fedora now in the process of getting fixed, that should cover many users who would have the buggy make. > > Is the version of your non-thundering-herd pipe wakeup patch attached to > > https://lore.kernel.org/lkml/CAHk-=wicgTacrHUJmSBbW9MYAdMPdrXzULPNqQ3G7+HkLeNf1Q@mail.gmail.com/ > > still the best version to test performance with? > > That's my latest version, but you'll have to tweak it a tiny bit > because of d1c6a2aa02af ("pipe: simplify signal handling in > pipe_read() and add comments") which I did after that patch. That's what I encountered, and I ended up manually fixing it up, resulting in the attached patch. Does that look reasonable? > The easiest way to resolve it is likely to revert that d1c6a2aa02af, > then apply the non-thundering-herd patch and then apply d1c6a2aa02af > again by hand - it's fairly straightforward (and you can return > -ERESTARTSYS directly if wait_event_interruptible_exclusive() fails, > because of all the same reasons why it coul dhappen without the > thundering-herd patch. I can try adding that additional return -ERESTARTSYS. Does that seem likely to have a noticeable additional performance impact? - Josh Triplett