Re: [PATCH] pipe_read: don't wake up the writer if the pipe is still full

From: Sapkal, Swapnil
Date: Wed Feb 26 2025 - 12:58:19 EST


Hi Oleg,

On 2/26/2025 5:08 PM, Oleg Nesterov wrote:
Thanks Sapkal!

I'll try to think. Meanwhile,

On 02/26, Sapkal, Swapnil wrote:

Exact command with parameters is

/usr/bin/hackbench -g 16 -f 20 --threads --pipe -l 100000 -s 100

Can you reproduce with "--process" rather than "--threads" ?

I was able to reproduce the issue with processes also. Total 33 processes were sleeping out of which 20 were readers and 13 were writers.

The stack trace for main hackbench process is as follows:

[<0>] do_wait+0xb5/0x110
[<0>] kernel_wait4+0xb2/0x150
[<0>] __do_sys_wait4+0x89/0xa0
[<0>] __x64_sys_wait4+0x20/0x30
[<0>] x64_sys_call+0x1bf7/0x2140
[<0>] do_syscall_64+0x6f/0x110
[<0>] entry_SYSCALL_64_after_hwframe+0x76/0x7e

I am trying to reproduce the issue with suggestions by Mateusz.

Oleg.

--
Thanks and Regards,
Swapnil