Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!snorkelwacker!bloom-beacon!primerd!wolman!barry From: barry@wolman.prime.com Newsgroups: comp.unix.questions Subject: Flushing Dirty Pages to Disk Message-ID: <34200005@wolman> Date: 29 Jun 90 19:12:00 GMT Lines: 34 Nf-ID: #N:wolman:34200005:000:1389 Nf-From: wolman.prime.com!barry Jun 29 15:12:00 1990 For the SPEC version of my IOBENCH benchmark, I need to be able to determine how long it takes to flush an unknown number of pages from the buffer cache to their respective files. Berkeley variants of UNIX contain a fsync(fd) system call that causes all "dirty" pages for the specified open file in the buffer cache to be written to disk, and doesn't return until this is done. Thus, if I have a set of open files, I can flush just their pages to disk and determine how long it took by the simple sequence time(&start); for(i=0;i