Re: [PATCH v3 20/21] __dentry_kill(): new locking scheme

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

 



On Mon, Jul 07, 2025 at 10:00:38PM +0200, Max Kellermann wrote:

> Sorry Al, I don't get it.
> I understand that objects that are still referenced must not be freed,
> and of course a dentry that has started the process of dying by
> __dentry_kill() needs to remain in the tree, and that its parent must
> not be freed either. Of course!
> 
> But none of this explains why you added this "d_lockref.count<0"
> check, which I doubt is correct because it causes a busy loop, burning
> CPU cycles without doing anything.

Busy loop here means that everything in the tree is either busy or already
in process of being torn down *by* *another* *thread*.  And that's already
in process - not just selected for it (see collect2 in the same loop).

What *can* we do in that case?  On the level of shrink_dcache_parent(), that
is.  Ignore that these suckers are there?  Fine, but that means we are failing
to evict the stuff that has no busy descendents.

The interesting question is what the other thread is doing...




[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