inode: Make unused inode LRU per superblock
The inode unused list is currently a global LRU. This does not match the other global filesystem cache - the dentry cache - which uses per-superblock LRU lists. Hence we have related filesystem object types using different LRU reclaimation schemes. To enable a per-superblock filesystem cache shrinker, both of these caches need to have per-sb unused object LRU lists. Hence this patch converts the global inode LRU to per-sb LRUs. The patch only does rudimentary per-sb propotioning in the shrinker infrastructure, as this gets removed when the per-sb shrinker callouts are introduced later on. Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
fcb94f72d3
commit
98b745c647
3 changed files with 85 additions and 11 deletions
|
|
@ -1397,6 +1397,10 @@ struct super_block {
|
|||
struct list_head s_dentry_lru; /* unused dentry lru */
|
||||
int s_nr_dentry_unused; /* # of dentry on lru */
|
||||
|
||||
/* inode_lru_lock protects s_inode_lru and s_nr_inodes_unused */
|
||||
struct list_head s_inode_lru; /* unused inode lru */
|
||||
int s_nr_inodes_unused; /* # of inodes on lru */
|
||||
|
||||
struct block_device *s_bdev;
|
||||
struct backing_dev_info *s_bdi;
|
||||
struct mtd_info *s_mtd;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue