[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1a969884-8245-4bea-b4cc-d1727348bf50@amd.com>
Date: Tue, 4 Mar 2025 11:01:07 +0530
From: K Prateek Nayak <kprateek.nayak@....com>
To: Linus Torvalds <torvalds@...ux-foundation.org>, Oleg Nesterov
<oleg@...hat.com>
CC: Mateusz Guzik <mjguzik@...il.com>, "Sapkal, Swapnil"
<swapnil.sapkal@....com>, 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>, "Shenoy, Gautham Ranjal"
<gautham.shenoy@....com>, <Neeraj.Upadhyay@....com>, <Ananth.narayan@....com>
Subject: Re: [PATCH] pipe_read: don't wake up the writer if the pipe is still
full
Hello Linus,
On 3/4/2025 2:16 AM, Linus Torvalds wrote:
> On Mon, 3 Mar 2025 at 10:28, Oleg Nesterov <oleg@...hat.com> wrote:
>>
>> Stupid question... but do we really need to change the code which update
>> tail/head if we pack them into a single word?
>
> No. It's only the READ_ONCE() parts that need changing.
>
> See this suggested patch, which does something very similar to what
> you were thinking of.
>
> ENTIRELY UNTESTED, but it seems to generate ok code. It might even
> generate better code than what we have now.
With the patch on top of commit aaec5a95d596 ("pipe_read: don't wake up
the writer if the pipe is still full"), we've not seen any hangs yet
with a few thousand iterations of short loops, and a few hundred
iterations of larger loop sizes with hackbench.
If you can provide you S-o-b, we can send out an official patch with a
commit log. We'll wait for Oleg's response in case he has any concerns.
>
> Linus
--
Thanks and Regards,
Prateek
Powered by blists - more mailing lists