* Why doesn't disk io occur to read file system metadata despite clearing dentry and inode with drop_cache command?
@ 2019-09-11 6:27 Daegyu Han
0 siblings, 0 replies; only message in thread
From: Daegyu Han @ 2019-09-11 6:27 UTC (permalink / raw)
I am confused about "echo # >/proc/sys/vm/drop_caches" and blockdev --flushbufs.
According to OSStep book written by Remzi,If the target inodes are not
cached in memory, disk IO should be occur to readthe inode, which will
make a dentry data structure on memory.
To my knowledge, echo 3 >/proc/sys/vm/drop_caches is to drop(clear)
page cahche, inodes and dentry. I have experimented with blktrace to
figure out whether disk io is really occurring to read the inode.
1. echo 3 > /proc/sys/vm/drop_caches
However, there is no disk io to read inode. I can only see the disk io
to read 16KB data block.
2. echo 3 > /proc/sys/vm/drop_caches` and `blockdev --flushbufs
/dev/nvme0n1I found block access (+8(512*8=4KB)) to read inode.
A quick look at how blockdev --flushbufs works in the kernel code
shows that it clears the superblock.
Why doesn't disk io occur to read inodes with drop_cache alone?
The kernel book called ULK says that inodes and superblocks are cached
in buffer-cache.Is this the reason for this?
I infer as follows:Is the buffer_head data structure not flushed to
disk by drop_cache alone because the storage device is still mapped in
^ permalink raw reply [flat|nested] only message in thread
only message in thread, back to index
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-11 6:27 Why doesn't disk io occur to read file system metadata despite clearing dentry and inode with drop_cache command? Daegyu Han
Linux-ext4 Archive on lore.kernel.org
Archives are clonable:
git clone --mirror https://lore.kernel.org/linux-ext4/0 linux-ext4/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 linux-ext4 linux-ext4/ https://lore.kernel.org/linux-ext4 \
Newsgroup available over NNTP:
AGPL code for this site: git clone https://public-inbox.org/ public-inbox