how to knock a page out of file cache

Ishwor Gurung ishwor.gurung at gmail.com
Wed Oct 21 03:13:55 EDT 2009


[...]
> I thought of simply opening and writing to the file to dirty it's
> pages, but there no guarantee that pdflush will have already written
> the dirty pages to disk -pretty sure it depends on all the dirty ratio
> and intervals.
>
> Does anybody know of a system call that will 'knock' the file out of
> file cache?  Can madvise or fadvise do this?

Does this help http://www.westnet.com/~gsmith/content/linux-pdflush.htm ?
(Getting hold of procfs and doing it in Python?)

Also, are you looking for sync(2) http://linux.die.net/man/2/sync?

[...]
-- 
Regards,
Ishwor Gurung



More information about the Python-list mailing list