On Mon, 10 Mar 2025 at 13:34, Hillf Danton <hdanton@xxxxxxxx> wrote: > > The step-03 in my scenario [1] shows a reader sleeps at line-370 after > making the pipe empty, so after your change that cuts the chance for > waking up writer, who will wake up the sleeping reader? Nobody. But step-03 will wake the writer. And no, nobody will wake readers, because the pipe is empty. Only the next writer that adds data to the pipe should wake any readers. Note that the logic that sets "wake_writer" and "was_empty" is all protected by the pipe semaphore. So there are no races wrt figuring out "should we wake readers/writers". So I really think you need to very explicitly point to what you think the problem is. Not point to some other email. Write out all out in full and explain. Linus