Re: [PATCH v7 10/12] run-command: poll child stdin in addition to stdout
- From
Adrian Ratiu <adrian.ratiu@collabora.com>
- Date
- Jan 22, 2026, 09:57 UTC
- Message-ID
- <87a4y6q8an.fsf@collabora.com>
- In-Reply-To
- <ba1444a7-0c61-42ea-94dc-cd1670ebf3fa@app.fastmail.com>
On Wed, 21 Jan 2026, "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> wrote:
Show 27 quoted lines
> On Wed, Jan 21, 2026, at 22:54, Adrian Ratiu wrote: >> Child input feeding might hit the 100ms output poll timeout as a >> side-effect of the ungroup=0 design when feeding multiple children >> in parallel and buffering their outputs. >> >> This throttles the write throughtput as reported by Kristoffer. >> >> Peff also noted that the parent might block if the write pipe is full >> and cause a deadlock if both parent + child wait for one another. >> >> Thus we refactor the run-command I/O loop so it polls on both child >> input and output fds to eliminate the risk of artificial 100ms >> latencies and unnecessarily blocking the main process. >> >> This ensures that parallel hooks are fed data ASAP while maintaining >> responsiveness for (sideband) output. >> >> It's worth noting that in our current design, sequential execution >> is not affected by this because it still uses the ungroup=1 behavior. >> >> Reported-by: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> >> Suggested-by: Jeff King <peff@peff.net> >> Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com> >> --- > > Thanks for rewriting the commit message to include some user-level > behavior/symptoms.
Thank you as well for all the feedback.
I just noticed that I wrote in the title "stdout" instead of "stderr" (the streams are merged in all hooks with the exception of pre-push), so maybe it's better to just use input and output.
Will fix in v8.