Re: [PATCH RFC v2 5/6] inode: port __I_LRU_ISOLATING to var event

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

 



On Fri, 23 Aug 2024 at 08:37, NeilBrown <neilb@xxxxxxx> wrote:
>
> I would really like to add
>
>   wait_var_event_locked(variable, condition, spinlock)
>
> so that above would be one or two lines.

We don't even have that for the regular wait_event, but we do have

  wait_event_interruptible_locked
  wait_event_interruptible_locked_irq

but they actually only work on the wait-queue lock, not on some
generic "use this lock".

Honestly, I like your version much better, but having two *very*
different models for what "locked" means looks wrong.

The wait-queue lock (our current "locked" event version) is a rather
important special case, though, and takes advantage of holding the
waitqueue lock by then using __add_wait_queue_entry_tail() without
locking.

"You are in a maze of twisty little functions, all alike".

              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