[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241229115741.GB27491@redhat.com>
Date: Sun, 29 Dec 2024 12:57:41 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Manfred Spraul <manfred@...orfullife.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
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/28, Manfred Spraul wrote:
>
> On 12/28/24 4:22 PM, Oleg Nesterov wrote:
> >
> >Now suppose that another CPU executes wake() between LOAD(CONDITION)
> >and list_add(entry, head). With your patch wait() will miss the event.
> >The same for __pollwait(), I think...
...
> It could still work for prepare_to_wait and thus fs/pipe, since then the
> smb_mb() in set_current_state prevents earlier execution.
Not sure, please see the note about __pollwait() above.
I think that your patch (and the original patch from WangYuli) has the same
proble with pipe_poll()->poll_wait()->__pollwait().
Oleg.
Powered by blists - more mailing lists