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]

 



On Mon, 3 Mar 2025 at 08:33, Mateusz Guzik <mjguzik@xxxxxxxxx> wrote:
>
> The stock code already has a dedicated routine to advance the tail,
> adding one for head (instead of an ad-hoc increment) is borderline
> just clean up.

There's currently a fair number of open-coded assignments:

    git grep -E 'pipe->((tail)|(head)).*=' fs/

and some of those are under specific locking rules together with other
updates (ie the watch-queue 'note_loss' thing.

But hey, if some explicit empty/full flag is simpler, then it
certainly does fit with our current model too, since we already do
have those other flags (exactly like 'note_loss')

I do particularly hate seeing 'bool' in structures like this. On alpha
it is either fundamentally racy, or it's 32-bit. On other
architectures, it's typically 8 bits for a 1-bit value.

But we do have holes in that structure where it slots.

             Linus




[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