[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whZHXHtpdakcLx+K-LF0=tav6r698Ph3=p3Fpuvi2D+5w@mail.gmail.com>
Date: Sun, 29 Dec 2024 09:27:21 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Manfred Spraul <manfred@...orfullife.com>, Christian Brauner <brauner@...nel.org>,
David Howells <dhowells@...hat.com>, WangYuli <wangyuli@...ontech.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: PATCH? avoid the unnecessary wakeups in pipe_read()
On Sun, 29 Dec 2024 at 05:58, Oleg Nesterov <oleg@...hat.com> wrote:
>
> If I read this code correctly, in this case the child will wakeup the parent
> 4095 times for no reason, pipe_writable() == !pipe_pull() will still be true
> until the last read(fd[0], &c, 1) does
Ack, that patch looks sane to me.
Only wake writer if we actually released a pipe slot, and it was full
before we did so.
Makes sense.
Linus
Powered by blists - more mailing lists