Re: [PATCH] pipe_read: don't wake up the writer if the pipe is still full

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Linus,

On 3/4/2025 2:16 AM, Linus Torvalds wrote:
On Mon, 3 Mar 2025 at 10:28, Oleg Nesterov <oleg@xxxxxxxxxx> 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





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux