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]

 



Sorry for the noise...

and currently this is fine. 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?

On 12/29, Oleg Nesterov wrote:
>
> On 12/29, Manfred Spraul wrote:
> >
> > >I think that your patch (and the original patch from WangYuli) has the same
> > >proble with pipe_poll()->poll_wait()->__pollwait().
> >
> > What is the memory barrier for pipe_poll()?
> >
> > There is poll_wait()->__pollwait()->add_wait_queue()->spin_unlock(). thus
> > only store_release.
> >
> > And then READ_ONCE(), i.e. no memory barrier.
> >
> > Thus the CPU would be free to load pipe->head and pipe->tail before adding
> > the entry to the poll table.
> >
> > Correct?
>
> Yes, this was my thinking.
>
> See also my initial reply to WangYuli
> https://lore.kernel.org/all/20241226160007.GA11118@xxxxxxxxxx/
>
> Do you agree?
>
> 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