Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757293AbYAJVb6 (ORCPT ); Thu, 10 Jan 2008 16:31:58 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753851AbYAJVbv (ORCPT ); Thu, 10 Jan 2008 16:31:51 -0500 Received: from lazybastard.de ([212.112.238.170]:37315 "EHLO longford.lazybastard.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753794AbYAJVbu (ORCPT ); Thu, 10 Jan 2008 16:31:50 -0500 Date: Thu, 10 Jan 2008 22:25:20 +0100 From: =?utf-8?B?SsO2cm4=?= Engel To: Matt Mackall Cc: Linus Torvalds , Pekka J Enberg , Christoph Lameter , Ingo Molnar , Hugh Dickins , Andi Kleen , Peter Zijlstra , Linux Kernel Mailing List Subject: Re: [RFC PATCH] greatly reduce SLOB external fragmentation Message-ID: <20080110212519.GA29847@lazybastard.org> References: <1199641910.8215.28.camel@cinder.waste.org> <1199906151.6245.57.camel@cinder.waste.org> <1199919548.6245.74.camel@cinder.waste.org> <1199987366.5331.92.camel@cinder.waste.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1199987366.5331.92.camel@cinder.waste.org> User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1731 Lines: 39 On Thu, 10 January 2008 11:49:25 -0600, Matt Mackall wrote: > > b) grouping objects of the same -type- (not size) together should mean > they have similar lifetimes and thereby keep fragmentation low > > (b) is known to be false, you just have to look at our dcache and icache > pinning. (b) is half-true, actually. The grouping by lifetime makes a lot of sense. LogFS has a similar problem to slabs (only full segments are useful, a single object can pin the segment). And when I grouped my objects very roughly by their life expectency, the impact was *HUGE*! In both cases, you want slabs/segments that are either close to 100% full or close to 0% full. It matters a lot when you have to move objects around and I would bet it matters even more when you cannot move objects and the slab just remains pinned. So just because the type alone is a relatively bad heuristic for life expectency does not make the concept false. Bonwick was onto something. He just failed in picking a good heuristic. Quite likely spreading by type was even a bonus when slab was developed, because even such a crude heuristic is slightly better than completely randomized lifetimes. I've been meaning to split the dentry cache into 2-3 seperate ones for a while and kept spending my time elsewhere. But I remain convinced that this will make a measurable difference. Jörn -- Never argue with idiots - first they drag you down to their level, then they beat you with experience. -- unknown -- 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/