4 ms·
> In that case, if there are dirtied pages in the page cache, the question is what can you do? Sooner or later the writes will time out, and if you leave the pa
by throw0101a 5y ago
> In that case, if there are dirtied pages in the page cache, the question is what can you do? Sooner or later the writes will time out, and if you leave the pages dirty, then it effectively becomes a permanent memory leak.
FreeBSD keeps the dirty buffer (always marked as dirty) in memory as long as the device exists:
* https://github.com/freebsd/freebsd-src/commit/e4e8fec98ae986357cdc208b04557dba55a59266 https://github.com/freebsd/freebsd-src/commit/e4e8fec98ae986...
You only toss the data when the device associated with the data goes away:
* https://github.com/freebsd/freebsd-src/commit/46b5afe7b1ae0ee655ec863ebe373a3cf16eef1d https://github.com/freebsd/freebsd-src/commit/46b5afe7b1ae0e...
- Dylan16807 5y agoHonestly even if a device disappears it's probably worth keeping around those pending writes for several seconds. It might come back, and if it comes back fast enough it probably hasn't been altered by any other machine.