Suppose a backend process reads the same configuration file twice. The first read may require storage I/O, but the second can be much faster even though the application has no cache of its own.
Now consider a large log write. write() may return quickly while the storage device continues working afterward.
Both behaviors come from the page cache, where the operating system keeps file data in RAM. Reads can be served directly from memory, while buffered writes can update cached pages first and write them to storage later.
A file operation can complete in memory even when storage I/O happens before, after, or not at all.
To understand file performance and write stalls, it helps to track cached pages as they move between clean, dirty, and write-back states.
This chapter follows cached read, memory-mapped, and buffered-write paths, explains clean, dirty, and write-back transitions, and examines write-back triggers, dirty-page controls, memory pressure, observation, and backend consequences.