lkml.org 
[lkml]   [1999]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Clearing the I/O caches? (for benchmark tests)
Hi,

On 15 Jul 1999 15:55:40 -0700, tmk@cse.ucsc.edu (Tom M. Kroeger) said:

> My apologies, I may have been unclear. I've been trying to clear all
> the cache data and have been calling the following: to reduce the

> dcache -- prune_dcache(0);
> page cache -- empty_dcache(); -- a clone of prune dcache that calls
> clear_inode_pages() for each dcache entry
> -- and/or a modified shrink_mmap() that
> if (xxxx_under_min()) removed and (below)
> inode cache -- free_inode_memory(20);
> buffer cache -- sys_sync(); & invalidate_all_buffers();

> all in an order something like this.

That's fine. The one thing it will _not_ do is clear out cached pages
which are still referenced by the virtual memory system. Flushing
memory by trying to allocate lots will try to swap that memory out too.
Remember, any running binaries or in-use libraries will have pages
mapped into some process's address space, so just going through the
cache won't get rid of those pages: you'll have to unmap them first by
passing through the swapper too.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.050 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site