LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 02-10-2020, 12:55 PM   #1
YuvalAvra
LQ Newbie
 
Registered: Nov 2019
Posts: 12

Rep: Reputation: Disabled
Are direcotories saved in the page cache?


I understand that the dentry cache holds directory structure, and when a file that is not in the dentry cache is accessed, the directory structure is read from disk.

Since directories are just special files, does the kernel first tries to read them from the page cache before reading from disk?

For example, if I access /home/foo/bar, then clear the dentry cache, and then access it again, will the directory structure be read from disk or from the page cache?
 
Old 02-11-2020, 08:02 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,160

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
Page cache has no idea what its contents are. It holds recently used blocks. If the directory was used more recently than the last thing dropped from cache then it is probably there. You can force a cache flush through /proc/sys/vm/drop_caches.
 
1 members found this post helpful.
  


Reply

Tags
cache



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does fs/buffer.c exist? Didn't the page cache and buffer cache merge in 2.4? bagelboy62 Linux - Kernel 2 12-14-2017 08:12 AM
what is left inside the cache even after clearing the page cache data? ankitlinux Linux - Newbie 4 10-09-2015 06:06 AM
Difference between page cache and buffer cache Nayaka Linux - Kernel 5 09-28-2011 08:23 AM
Can't open saved web pages just saved by web browser... JeanBrownHarrel General 2 04-06-2008 11:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration