Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755449AbYADWbV (ORCPT ); Fri, 4 Jan 2008 17:31:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753920AbYADWbN (ORCPT ); Fri, 4 Jan 2008 17:31:13 -0500 Received: from waste.org ([66.93.16.53]:45023 "EHLO waste.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753559AbYADWbN (ORCPT ); Fri, 4 Jan 2008 17:31:13 -0500 Subject: Re: [PATCH] procfs: provide slub's /proc/slabinfo From: Matt Mackall To: Christoph Lameter Cc: Ingo Molnar , Linus Torvalds , Pekka Enberg , Hugh Dickins , Andi Kleen , Peter Zijlstra , Linux Kernel Mailing List In-Reply-To: References: <84144f020801021109v78e06c6k10d26af0e330fc85@mail.gmail.com> <1199314218.4497.109.camel@cinder.waste.org> <20080103085239.GA10813@elte.hu> <1199378818.8274.25.camel@cinder.waste.org> <1199419890.4608.77.camel@cinder.waste.org> <1199480150.3821.23.camel@cinder.waste.org> Content-Type: text/plain Date: Fri, 04 Jan 2008 16:30:18 -0600 Message-Id: <1199485818.3821.46.camel@cinder.waste.org> Mime-Version: 1.0 X-Mailer: Evolution 2.12.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1197 Lines: 30 On Fri, 2008-01-04 at 13:36 -0800, Christoph Lameter wrote: > Ok. So lets try a worst case scenario. If we do a 128 byte kmalloc > then we > can allocate the following number of object from one 4k slab > > SLUB 32 (all memory of the 4k page is used for 128 byte objects) > SLAB 29/30 (management structure occupies first two/three objects) > SLOB 30(?) (Alignment results in object being 136 byte of effective size, > we have 16 bytes leftover that could be used for a > very small allocation. Right?) Don't know how you got to 136, the minimum alignment is 4 on x86. But I already said in my last email that SLUB would win for the special case of power of two allocations. But as long as we're looking at worst cases, let's consider an alloc of 257 bytes.. SLUB 8 (1016 bytes wasted) SLOB 15 (105 bytes wasted, with 136 bytes still usable) Can we be done with this now, please? -- Mathematics is the supreme nostalgia of our time. -- 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/