Re: When to lock pipe->rd_wait.lock?

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

 



On Wed, Sep 20, 2023 at 5:50 PM Christian Brauner <brauner@xxxxxxxxxx> wrote:
> I don't think so, O_NOTIFICATION/watch queue pipes allow userspace to
> use pipe_read() and pipe_write() but prevent the usage of splice. The
> spinlock is there for post_one_notification() which is called from
> kernel context.

Oohh, that was watch_queue, not wait_queue! This is how I
misunderstood your previous email.

So the spinlock is used in pipe_write() only just in case this is a
O_NOTIFICATION_PIPE. If I understand this correctly, it means the
spinlock could be omitted for the majority of pipes that are not
O_NOTIFICATION_PIPE?
Do you think it could be a worthy optimization to make the spinlock
conditional? I mean, how many pipes are there usually, and how many of
these are really O_NOTIFICATION_PIPE? This is a very rare exotic
feature, isn't it?




[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