|
|
Log in / Subscribe / Register

A discussion between database and kernel developers

A discussion between database and kernel developers

Posted Mar 11, 2014 9:21 UTC (Tue) by iq-0 (subscriber, #36655)
In reply to: A discussion between database and kernel developers by fest3er
Parent article: A discussion between database and kernel developers

I still think that files that are not longer linked to the filesystem, but that have dirty-pages, should be put on a "we don't want any writeback for this unless there is memory pressure". This should probably be the default behaviour.

This makes unlinked temporary files very efficient (no unnecessary writes for stuff that we don't want to make persistent, like tmpfs) and explicitly backed by possible disk space (reserved from the filesystem, unlike tmpfs) and makes the memory easily reclaimable under memory pressure (sort of like tmpfs with dedicated swap space).
Effectively making all temporary file uses on all filesystems with optimized support effectively perform like tmpfs backed when there is no memory pressure (not a single byte should ever have to be written in that case, the inode could be fully in-memory and the space reservation would also be fully in-memory reservation of the blocks from the free space, on crash nothing would need to be recovered, because on disk it would already be in the free space list).

Should the new "link filedescriptor syscall" be used than that should probably trigger fdatasync on the filedescriptor (similar to sync on rename).

And an option to open normally linked file as such and having that file appear truncated in case of crash (because any blocks allocated would only be allocated in memory and on disk would always remain on the free space list).


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds