Re: [PATCH] pipe_read: don't wake up the writer if the pipe is still full
From: Oleg Nesterov
Date: Fri Mar 07 2025 - 06:30:09 EST
On 03/07, Hillf Danton wrote:
>
> On Fri, 7 Mar 2025 11:54:56 +0530 K Prateek Nayak <kprateek.nayak@xxxxxxx>
> >> step-03
> >> task-118766 new reader
> >> makes pipe empty
> >
> >Reader seeing a pipe full should wake up a writer allowing 118768 to
> >wakeup again and fill the pipe. Am I missing something?
> >
> Good catch, but that wakeup was cut off [2,3]
>
> [2] https://lore.kernel.org/lkml/20250304123457.GA25281@xxxxxxxxxx/
> [3] https://lore.kernel.org/all/20250210114039.GA3588@xxxxxxxxxx/
Why do you think
[PATCH v2 1/1] pipe: change pipe_write() to never add a zero-sized buffer
https://lore.kernel.org/all/20250210114039.GA3588@xxxxxxxxxx/
can make any difference ???
Where do you think a zero-sized buffer with ->len == 0 can come from?
Oleg.