Lookups are performed on the dentry cache, which result in an object in the inode cache.
查找是在dentry缓存中执行的,这将导致inode缓存中出现一个对象。
The dentry cache is built using a hash table and is hashed by the name of the object.
使用散列表创建dentry缓存,并且根据对象名分配缓存。
You can find the functions associated with the dentry cache in ./linux/fs/dcache.c (and ./linux/include/linux/dcache.h).
您可以在./linux/fs/dcache.c和 ./linux/include/linux/dcache.h 中找到与dentry缓存相关的函数。
When a file is opened, the dentry cache is populated with entries representing the directory levels representing the path.
当打开一个文件时,dentry缓存将被表示目录级别(目录级别表示路径)的条目填充。
Entries for the dentry cache are allocated from the dentry_cache slab allocator and use a least-recently-used (LRU) algorithm to prune entries when memory pressure exists.
dentry缓存的条目从dentry_cacheslab分配器分配,并且在缓存存在压力时使用最近不使用(least - recently - used,LRU)算法删除条目。
When a dentry object exists, an inode object will also exist in the inode cache.
如果存在一个dentry对象,那么inode缓存中也将存在一个inode对象。
Note that for each inode in the inode cache there is a corresponding dentry in the directory cache.
注意,对于inode缓存中的每个inode,在目录缓存中都有一个对应的dentry。
Note that for each inode in the inode cache there is a corresponding dentry in the directory cache.
注意,对于inode缓存中的每个inode,在目录缓存中都有一个对应的dentry。
应用推荐