[LU-12313] Mark lustre_inode_cache as reclaimable Created: 18/May/19  Updated: 27/Aug/20  Resolved: 21/Aug/19

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.13.0

Type: Improvement Priority: Minor
Reporter: Jacek Tomaka Assignee: Jacek Tomaka
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-13909 release invalid dentries proactively ... Resolved
Rank (Obsolete): 9223372036854775807

 Description   

As discussed in this email thread currently lustre does not mark memory allocated from slab as reclaimable. 

This makes the kernel's MemAvailable, SReclaimable and SUnreclaim (as reported by /proc/meminfo) unreliable, because the memory gets actually freed on memory pressure or when droping caches. 

This change should affect only how memory is reported and should not affect much else. 

As pointed out by NeilBrown other filesystems also set inode cache to reclaimable: 

That said: 9p, adfs, affs, befs, bfs, btrfs, ceph, cifs, coda, efs, ext2, ext4, f2fs, fat, freevxfs, fuse, gfs2, hpfs, isofs, jffs2, jfs, minix, nfs, nilfs, ntfs, ocfs2, openpromfs, overlayfs, procfs, qnx4, qnx6, reiserfs, romfs, squashfs, sysvfs, ubifs, udf, ufs, xfs all set SLAB_RECLAIM_ACCOUNT on their inode caches.

 Also from NeilBrown: 

Yes, I think lustre_inode_cache should certainly be flagged as
SLAB_RECLAIM_ACCOUNT.
If the SReclaimable value is too small (and there aren't many
reclaimable pagecache pages), vmscan can decide not to bother. This is
probably a fairly small risk but it is possible that the missing
SLAB_RECLAIM_ACCOUNT flag can result in memory not being reclaimed when
it could be.

 
It remains open question which other caches could also be marked as reclaimable but marking just lustre_inode_cache would be a good improvement.



 Comments   
Comment by Gerrit Updater [ 14/Aug/19 ]

Jacek Tomaka (jacek.tomaka@poczta.fm) uploaded a new patch: https://review.whamcloud.com/35790
Subject: LU-12313 llite: Mark lustre_inode_cache as reclaimable
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7f81c23593bc009d98853b031c4451ac04defe2e

Comment by Gerrit Updater [ 21/Aug/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35790/
Subject: LU-12313 llite: Mark lustre_inode_cache as reclaimable
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: b09e63db24e5770b0a53ac6d68f91f08dc368be4

Comment by Peter Jones [ 21/Aug/19 ]

Landed for 2.13

Generated at Sat Feb 10 02:51:29 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.