Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!zombie.ncsc.mil!news.mathworks.com!news.alpha.net!uwm.edu!vixen.cso.uiuc.edu!sdd.hp.com!news1.best.com!shell1.best.com!not-for-mail From: dillon@best.com (Matt Dillon) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Can FreeBSD execute programs in the disk cache? Date: 15 Jun 1995 22:20:36 -0700 Organization: Best Internet Communications, Inc. (info@best.com) Lines: 66 Message-ID: <3rr4bl$ho2@shell1.best.com> References: <ANSSI.SAARI.95Jun14105848@ivoryws23.lmf.eua.ericsson.se> <3rpu4v$28q@park.uvsc.edu> <3rqa0t$c6h@marina.cinenet.net> NNTP-Posting-Host: shell1.best.com :In article <3rqa0t$c6h@marina.cinenet.net>, :Bob Mercier <mercier@cinenet.net> wrote: :>Terry Lambert (terry@cs.weber.edu) wrote: :>: Anssi.Saari@lmf.eua.ericsson.se (Anssi Saari) wrote: :>: > :>: > Well, can it? Yes or no will do. :> :>: No. It can only execute programs in the CPU. :> :>: Much as your oven can't cook food in your fridge. :> :> :>: Terry Lambert :>: terry@cs.weber.edu :>: --- :>: Any opinions in this posting are my own and not those of my present :>: or previous employers. The answer to the original question, without making too many wording jokes about it, is simply: YES The more sophisticated answer is: YES, but the amount of caching depends on how heavily you are using the machine's memory (to run other programs, data file accesses, etc...) :>Well, this is a silly thread to go on and on about but I'd bet that, :>on some disk controllers, it would be possible for the controllers cache :>ram to appear in the host's address space. With alot of work coordinating :>between the VM system and the controller I bet the host could track :>what disk pages where in the controller's cache at any given time. It :>would probably be good enough if you could simply tell the controller :>when it was ok to release certain pages. Another alternative would be :>to disable caching on the controller and for the host to use the controller's :>ram however it wanted. :> :>Bob Sillyness is right! In general, the more on-disk and in-controller caching you have, the slower your disk accesses are. It didn't used to be this way, but drives are getting fast enough now that dicking around with two or three or more buffer copies on each transfered sector really eats into the performance. Seagate apparently eeked out greater performance from their barracudas by reducing the size of the cache and rearranging the cache algorithm. The best place to put caching is in the motherboard RAM, which is exactly where most operating systems (including FreeBSD) put it. High end OS's such as FreeBSD have an even greater advantage in that they can map the 'cached' pages directly into the program's VM and execute the program essentially 'out of the cache'. Winblows and most other microcomputer OS's don't even come close (except AmigaOS, which can of course). Most SCSI disks have some caching. Most IDE disks have very little. Most disk controllers have none and, in fact, you don't want them to have any for the reasons mentioned above. Direct DMA is the best way to go, especially on a Pentium/PCI-bus controller. -Matt -- Matthew Dillon VP Engineering, BEST Internet Communications, Inc. <dillon@best.com>, <dillon@apollo.west.oic.com> [always include a portion of the original email in any response!]