Directory Entry Cache

Owing to slow block media, it can take quite some time to find the inode associated with a filename. Even if the device data are already in the page cache (see Chapter 16), it is nonsensical to repeat the full lookup operation each time.

Linux uses the directory entry cache (dentry cache, for short) to provide quick access to the results of a previous full lookup operation (we take a closer look at this in Section 8.4.2). The cache is built around struct dentry, which has already been mentioned a few times.

Once the VFS — together with the filesystem implementations — has read the data of a directory or file entry, a dentry instance is created to cache the data found.

Continue reading here: Info

Was this article helpful?

0 0