[LU-13909] release invalid dentries proactively on client Created: 18/Aug/20  Updated: 25/Jan/24  Resolved: 17/Feb/21

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.10.0, Lustre 2.12.0, Lustre 2.13.0
Fix Version/s: Lustre 2.14.0

Type: Bug Priority: Minor
Reporter: Lai Siyao Assignee: Lai Siyao
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-12313 Mark lustre_inode_cache as reclaimable Resolved
is related to LU-14408 very large lustre_inode_cache Open
is related to LU-13970 add an option to disable inode cache ... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

When file LOOKUP lock is canceled on client, its dentry becomes invalid, but this dentry is not released immediately, and is only marked "invalid" and is left in dcache and let system to reclaim when memory is tight. And it's the same for negative dentries when parent UPDATE is canceled.

Such dentries should be released to avoid OOM on client.



 Comments   
Comment by Gerrit Updater [ 18/Aug/20 ]

Lai Siyao (lai.siyao@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39685
Subject: LU-13909 llite: prune invalid dentries
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c59960cba56903ccbd3824f01c31a9cf31e66105

Comment by Gerrit Updater [ 27/Aug/20 ]

Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/39735
Subject: LU-13909 tests: get lustre_inode_cache count from sysfs
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: f45b51d8867acdf898ccb18dde58236476dbf74b

Comment by Andreas Dilger [ 27/Aug/20 ]

I noticed that the behaviour of the lustre_inode_cache is quite different between 2.12 and master. On 2.12 it is merged with signal_cache and ptlrpc_cache and the /sys/kernel/slab/lustre_inode_cache/objects count varies widely during operation (e.g. hundreds of objects variance), but on master it gets its own slab and always shows only a small number of objects in the cache.

This seems to be a result of different flags on the slab at creation time, probably due to patch https://review.whamcloud.com/35790 "LU-12313 llite: Mark lustre_inode_cache as reclaimable".

Comment by Gerrit Updater [ 08/Sep/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39685/
Subject: LU-13909 llite: prune invalid dentries
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 1f0b2a0dca6a3296791584770bb0062d1b969c51

Comment by Gerrit Updater [ 12/Sep/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39735/
Subject: LU-13909 tests: get lustre_inode_cache count from sysfs
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: dc08f71bf98a2e126750b7d1e6d2c3dd63d1edc2

Comment by Peter Jones [ 17/Feb/21 ]

Landed for 2.14

Generated at Sat Feb 10 03:05:14 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.