Is there a way to flush the file cache?



I'm writing a system exerciser that checks memory and disk I/O. Is there a
C call that flushes the file cache so that I can be assured that my freads
are coming from the disk and not the RAM. I'm using a sync() but I don't
think that does the whole job, it guarantees that the disk writes happen
but I don't think it clears out the file cache.

Thanks,
.



Relevant Pages

  • Re: non_blocking question
    ... Physical Disk Sustained Write Peformance ... For files to typical Linux filesystem (e.g. ... Processor Interrupt Handling ... bypassing the file cache. ...
    (comp.unix.programmer)
  • IA64 Linux VM performance woes.
    ... SGI ProPack 2.4 for Linux, ... We have been experiencing bad performance and downright bad behavior when we ... At first the throughtput we are getting without file cache bypass is at around ... Control the amount of data flushed out to disk in set time periods; ...
    (comp.sys.sgi.admin)
  • IA64 Linux VM performance woes.
    ... SGI ProPack 2.4 for Linux, ... We have been experiencing bad performance and downright bad behavior when we ... At first the throughtput we are getting without file cache bypass is at around ... Control the amount of data flushed out to disk in set time periods; ...
    (Linux-Kernel)
  • Re: Is there a way to flush the file cache?
    ... C call that flushes the file cache so that I can be assured that my freads ... are coming from the disk and not the RAM. ...
    (comp.os.linux.misc)
  • Re: Is there a way to flush the file cache?
    ... C call that flushes the file cache so that I can be assured that my freads ... are coming from the disk and not the RAM. ...
    (comp.os.linux.misc)