Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!elroy.jpl.nasa.gov!lll-winken!gauss.llnl.gov!casey From: casey@gauss.llnl.gov (Casey Leedom) Newsgroups: comp.arch Subject: Re: Real disk FASTER than Ram disk Message-ID: <60196@lll-winken.LLNL.GOV> Date: 30 May 90 21:58:33 GMT References: <641@sibyl.eleceng.ua.OZ> <136299@sun.Eng.Sun.COM> <1990May27.210935.8564@murdoch.acc.Virginia.EDU> <3402@auspex.auspex.com> Sender: usenet@lll-winken.LLNL.GOV Reply-To: casey@gauss.llnl.gov (Casey Leedom) Organization: Lawrence Livermore National Laboratory Lines: 17 It's trivial to avoid the extra copy. You just add an extra flag to the buffer header that indicates whether the header points at a buffer pool block or a block on the ram disk. A read of a ram disk block not in the buffer cache just caused a buffer header to be pointed at the ram disk block and the special flag to be set. A flush of a buffer cache block just caused the buffer header to be repointed back into the buffer cache and the flag to be cleared. We did this for 2.10BSD and it worked very nicely. A better solution (as has been pointed out) is to allow for memory resident file systems that are only written out to backing disk when space is needed. This works well for temporary file systems like /tmp where a compiler pass may create a temporary files and a later pass reads and deletes the file. If there's enough space in memory, the files blocks should never hit real disk. Casey