Re: [RESEND PATCH] fs/pipe: Introduce a check to skip sleeping processes during pipe read/write

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

 



Hi Manfred,

On 12/29, Manfred Spraul wrote:
>
> Hi Oleg,
>
> On 12/29/24 2:13 PM, Oleg Nesterov wrote:
> >Sorry for the noise...
> >
> >and currently this is fine.

Heh, please see below.

> But if we want to add the wq_has_sleeper()
> >checks into fs/pipe.c then pipe_poll() needs smp_mb() after it calls
> >poll_wait().
> >
> >Agreed?
>
> Yes, agreed.
>
> Just the comment in pipe_poll() was a bit tricky for me.

Well yes, but... It turns out I didn't grep enough.

See fs/splice.c and wakeup_pipe_readers/writers (which should use
wq_has_sleeper() for grep sake). And I don't understand why do these helpers
use key == NULL...

So it seems that pipe_poll() already needs smp_mb() to fix the current code,
at least in theory. I'll recheck and send the patch(es).

Oleg.





[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