It seems to me that the solution would be an extra flag for a mountpoint that says "files put in this directory should only be flushed to disk with low priority". i.e. have /tmp really existing on disk, but ionice the process for writing the in-memory pages to disk.
BTW, Mandriva/Mageia has done /tmp on tmpfs for ages (I think ~ 5 years), and it does work fine.
Posted Jun 5, 2012 12:23 UTC (Tue) by roblucid (subscriber, #48964)
[Link]
Except application writers can open temporary files read/write and unlink the newly created file so only the file descriptor provides access to it.
That prevents files getting left around, so rather than a new flag, filesystems could stop sync-ing the disk copy, in this situation, reasoning the file is ephemeral.
On TMPFS based /tmp systems like Solaris (I used it with SunOS 4) then humongeous temporary files would need special arrangements and placing, disks just tended not to have much free space. Disks were not even 1GB and overloading memory + swap space with temp files, tended to be more reliable in operation in practice, because processes could still process even when some luser had filled the disk.