From: Josh MacDonald <jm...@CS.Berkeley.EDU>
Date: Mon, 28 Jan 2002 18:20:12 +0100
Local: Mon, Jan 28 2002 12:20 pm
Subject: Note describing poor dcache utilization under high memory pressure
When memory pressure becomes high, the Linux kswapd begins calling
shrink_caches() from try_to_free_pages() with an integer priority from
6 (the default, lowest priority) to 1 (high priority). Looking
specifically at the dcache, this results in a calls to
shrink_dcache_memory() that attempt to free a fraction (1/priority) of
the inactive dcache entries. This ultimately leads to prune_dcache()
scanning the dcache in least-recently-used order attempting to call
kmem_cache_free() on some number of dcache entries.
Dcache entries are allocated from the kmem_slab_cache, which manages
In order to measure this effect (via /proc/slabinfo) I first populated
dentry_cache 10170 10170 128 339 339 1 : 252 126
(i.e., 10170 active dentry objects, 10170 available dentry objects @
While running the memory-hog program to initiate swapping, the dcache
dentry_cache 693 3150 128 105 105 1 : 252 126
Meaning, the randomly-applied cache pressure was successful at freeing
So, it would seem that the dcache and kmem_slab_cache memory allocator
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.