[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241226205746.GC11118@redhat.com>
Date: Thu, 26 Dec 2024 21:57:46 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: WangYuli <wangyuli@...ontech.com>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Christian Brauner <brauner@...nel.org>
Subject: Re: [RESEND PATCH] fs/pipe: Introduce a check to skip sleeping
processes during pipe read/write
On 12/26, Linus Torvalds wrote:
>
> [ Ugh, removed the crazy cc list with tons of old addresses ]
thanks.
> So the optimization may be valid
I don't think so, see my initial reply.
unlike wait_event(), __pollwait() + the head/tail checks in pipe_poll()
doesn't have the necessary barriers (at least in theory) afaics. Between
add_wait_queue()->list_add() and LOAD(head/tail).
> (the config option definitely is
> not), but I think it needs to be explained much better.
>
> I end up being very nervous about this code because we've had bugs in
> this area, exactly because people optimize this code for the unixbench
> pipe benchmark.
Agreed!
Oleg.
Powered by blists - more mailing lists