Thread (14 messages) 14 messages, 5 authors, 2002-07-22

Re: [PATCH][1/2] return values shrink_dcache_memory etc

From: Linus Torvalds <torvalds@transmeta.com>
Date: 2002-07-20 20:07:37
Also in: lkml

On Sat, 20 Jul 2002, Rik van Riel wrote:
this patch, against current 2.5.27, builds on the patch that let
kmem_cache_shrink return the number of pages freed. This value
is used as the return value for shrink_dcache_memory and friends.
I disagree with the whole approach of having shrink_cache() return the
number of pages free.

The number is meaningless, since it has nothing to do with the actual
memory zones that are under pressure (right now, the memory zone is almost
always ZONE_NORMAL, which is correct, but that's just pure luck rather
than anything fundamental).

I'd be much more interested in the "put the cache pages on the dirty list,
and have memory pressure push them out in LRU order" approach. Somebody
already had preliminary patches.

That gets _rid_ of dcache_shrink() and friends, instead of making them
return meaningless numbers.

		Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help