Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756516AbYJWO02 (ORCPT ); Thu, 23 Oct 2008 10:26:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751455AbYJWOZ5 (ORCPT ); Thu, 23 Oct 2008 10:25:57 -0400 Received: from nlpi025.sbcis.sbc.com ([207.115.36.54]:35115 "EHLO nlpi025.prodigy.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752127AbYJWOZz (ORCPT ); Thu, 23 Oct 2008 10:25:55 -0400 Date: Thu, 23 Oct 2008 07:25:21 -0700 (PDT) From: Christoph Lameter X-X-Sender: cl@quilx.com To: Pekka Enberg cc: Miklos Szeredi , nickpiggin@yahoo.com.au, hugh@veritas.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org Subject: Re: SLUB defrag pull request? In-Reply-To: <84144f020810230714g7f5d36bas812ad691140ee453@mail.gmail.com> Message-ID: References: <1223883004.31587.15.camel@penberg-laptop> <84144f020810221348j536f0d84vca039ff32676e2cc@mail.gmail.com> <1224745831.25814.21.camel@penberg-laptop> <84144f020810230658o7c6b3651k2d671aab09aa71fb@mail.gmail.com> <84144f020810230714g7f5d36bas812ad691140ee453@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Score: -2.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1302 Lines: 26 On Thu, 23 Oct 2008, Pekka Enberg wrote: >> The problem looks like its freeing objects on a different processor that >> where it was used last. With the pointer array it is only necessary to touch >> the objects that contain the arrays. > > Interesting. SLAB gets away with this because of per-cpu caches or > because it uses the bufctls instead of a freelist? Exactly. Slab adds a special management structure to each slab page that contains the freelist and other stuff. Freeing first occurs to a per cpu queue that contains an array of pointers. Then later the objects are moved from the pointer array into the management structure for the slab. What we could do for SLUB is to generate a linked list of pointer arrays in the free objects of a slab page. If all objects are allocated then no pointer array is needed. The first object freed would become the first pointer array. If that is found to be exhausted then the object currently being freed is becoming the next pointer array and we put a link to the old one into the object as well. -- 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/