Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 20 Jul 2002 16:07:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 20 Jul 2002 16:07:37 -0400 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:12038 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Sat, 20 Jul 2002 16:07:36 -0400 Date: Sat, 20 Jul 2002 13:11:12 -0700 (PDT) From: Linus Torvalds To: Rik van Riel cc: Andrew Morton , , , Ed Tomlinson Subject: Re: [PATCH][1/2] return values shrink_dcache_memory etc In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1119 Lines: 30 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/