On Thu, 2007-11-01 at 16:15 +0530, addy soft wrote: > hello all, > > I am a newbie in filesystem field and wanted to benchmark filesystem > using pgmeter. > > But the source that i have downloaded from > http://pgmeter.sourceforge.net/ CVS seems to be too old and have a > kernel patch with it which is for kernel 2.2.6. > > There is a syscall implemented with that version of pgmeter which is > used to flush the page cache for a particular file. Since 2.6.16 there has been a drop_caches proc file. Instead of porting this system call, I think you could modify pgmeter to use this. Here are some details: =============================================== Writing to this will cause the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free. To free pagecache: * echo 1 > /proc/sys/vm/drop_caches To free dentries and inodes: * echo 2 > /proc/sys/vm/drop_caches To free pagecache, dentries and inodes: * echo 3 > /proc/sys/vm/drop_caches As this is a non-destructive operation and dirty objects are not freeable, the user should run "sync" first! =============================================== So instead of calling the system call, you should be able to call sync() and then write either 1 or 3 to the proc file. Hope that helps! Avishay - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html