From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset="iso-8859-1" From: Daniel Phillips Subject: Re: [PATCH][RFC] slabnow Date: Sun, 8 Sep 2002 22:45:19 +0200 References: <200209071006.18869.tomlins@cam.org> In-Reply-To: <200209071006.18869.tomlins@cam.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: Sender: owner-linux-mm@kvack.org Return-Path: To: Ed Tomlinson , linux-mm@kvack.org Cc: Andrew Morton , Rik van Riel List-ID: On Saturday 07 September 2002 16:06, Ed Tomlinson wrote: > + /* > + * Here we assume it costs one seek to replace a lru page and that > + * it also takes a seek to recreate a cache object. With this in > + * mind we age equal percentages of the lru and ageable caches. > + * This should balance the seeks generated by these structures. > + */ It's not a reliable assumption, for example, what is the relation between an skbuff and a disk seek? Still, a better model need not be much different from what you've done - simply pick an arbitrary unit against which you estimate the average cost of replacing one unit of a given slab, and plug that a ratios against that into each slab header. Make the default 1*DISK_SEEK_COST and you will get the current behaviour, then tune the things that are obviously broken. By the way, ratio multiplication is a *basic* and essential tool of any control system worthy of the name, it's too bad Linux is so horribly lacking in that department. (Life without double-length intermediate muldiv results is not worth living.) -- Daniel -- 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/