Re: Purging the Page Table (was: Purging the Buffer Cache)
Al Peat wrote: > > > Is there any way to completely purge the buffer > > > cache -- not just the write requests (ala 'sync' > > or > > > 'update'), but the whole thing? Can I just call > > > invalidate_buffers() or destroy_buffers()? Try this script: case "`id -u`" in 0) ;; *) echo Only root can run this script. 1>&2; exit 1 ;; esac mount | sort -k3 -r | \ while read dev ON dir TYPE type etc; do echo mount $dir -o remount mount $dir -o remount done mount | sort -k1 | \ while read dev ON dir TYPE type etc; do case "$dev" in /dev/*) echo hdparm -f $dev hdparm -f $dev >/dev/null ;; esac done -- Jamie - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Purging the Page Table (was: Purging the Buffer Cache)
--- Juri Haberland <[EMAIL PROTECTED]> wrote: > Al Peat wrote: > > > > Is there any way to completely purge the buffer > > cache -- not just the write requests (ala 'sync' > or > > 'update'), but the whole thing? Can I just call > > invalidate_buffers() or destroy_buffers()? > > What about the ioctl BLKFLSBUF ? > If you are running a SuSE distrib there is already a > tool called flushb > that does what you want. If not, you can download > the simple tool from > http://innominate.org/~juri/flushb.tar.gz Another question: what if I need to purge the page table of all files as well? Is there a clean way to do that? I've been looking at /mm/memory.c, but it doesn't look like clear_page_tables, etc. get exported. I need /all/ read requests to go to disk, and it'd be nice if I could do that without a reboot (but I'll take the reboot if that's the only way to go about it :) Thanks again, Al __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: Purging the Buffer Cache
Al Peat wrote: > > Is there any way to completely purge the buffer > cache -- not just the write requests (ala 'sync' or > 'update'), but the whole thing? Can I just call > invalidate_buffers() or destroy_buffers()? > > I know, why in the world would a person do such a > thing? Research. It'd be easier for me to write a > little program or add it to a module than wait for a > reboot each time I need a clean buffer cache. What about the ioctl BLKFLSBUF ? If you are running a SuSE distrib there is already a tool called flushb that does what you want. If not, you can download the simple tool from http://innominate.org/~juri/flushb.tar.gz Juri -- [EMAIL PROTECTED] system engineer innominate AG clustering & securitythe linux architects tel: +49-30-308806-45 fax: -77http://www.innominate.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Purging the Buffer Cache
Is there any way to completely purge the buffer cache -- not just the write requests (ala 'sync' or 'update'), but the whole thing? Can I just call invalidate_buffers() or destroy_buffers()? I know, why in the world would a person do such a thing? Research. It'd be easier for me to write a little program or add it to a module than wait for a reboot each time I need a clean buffer cache. Thanks in advance, Al __ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/