From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759459AbXENUGT (ORCPT ); Mon, 14 May 2007 16:06:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754259AbXENUGF (ORCPT ); Mon, 14 May 2007 16:06:05 -0400 Received: from netops-testserver-4-out.sgi.com ([192.48.171.29]:41038 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754130AbXENUGD (ORCPT ); Mon, 14 May 2007 16:06:03 -0400 Date: Mon, 14 May 2007 13:06:02 -0700 (PDT) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Peter Zijlstra cc: Matt Mackall , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Thomas Graf , David Miller , Andrew Morton , Daniel Phillips , Pekka Enberg Subject: Re: [PATCH 0/5] make slab gfp fair In-Reply-To: <1179172994.2942.49.camel@lappy> Message-ID: References: <20070514131904.440041502@chello.nl> <20070514161224.GC11115@waste.org> <1179164453.2942.26.camel@lappy> <1179170912.2942.37.camel@lappy> <1179172994.2942.49.camel@lappy> 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 On Mon, 14 May 2007, Peter Zijlstra wrote: > > Hmmm.. Maybe we could do that.... But what I had in mind was simply to > > set a page flag (DebugSlab()) if you know in alloc_slab that the slab > > should be only used for emergency allocation. If DebugSlab is set then the > > fastpath will not be called. You can trap all allocation attempts and > > insert whatever fancy logic you want in the debug path since its not > > performance critical. > > I might have missed some detail when I looked at SLUB, but I did not see > how setting SlabDebug would trap subsequent allocations to that slab. Ok its not evident in slab_alloc. But if SlabDebug is set then page->lockless_list is always NULL and we always fall back to __slab_alloc. There we check for SlabDebug and go to the debug: label. There you can insert any fancy processing you want.