[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250305045617.3038-1-hdanton@sina.com>
Date: Wed, 5 Mar 2025 12:56:16 +0800
From: Hillf Danton <hdanton@...a.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: K Prateek Nayak <kprateek.nayak@....com>,
Mateusz Guzik <mjguzik@...il.com>,
"Sapkal, Swapnil" <swapnil.sapkal@....com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pipe_read: don't wake up the writer if the pipe is still full
On Wed, 5 Mar 2025 00:49:09 +0100 Oleg Nesterov <oleg@...hat.com>
>
> Of course! Again, whatever the woken writer checks in pipe_writable()
> lockless, another writer can make pipe_full() true again.
>
> But why do we care? Why do you think that the change you propose makes
Because of the hang reported.
> more sense than the fix from Prateek or the (already merged) Linus's fix?
>
See the loop in ___wait_event(),
for (;;) {
prepare_to_wait_event();
// flip
if (condition)
break;
schedule();
}
After wakeup, waiter will sleep again if condition flips false on the waker
side before waiter checks condition, even if condition is atomic, no?
Powered by blists - more mailing lists