Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758702AbYJVVak (ORCPT ); Wed, 22 Oct 2008 17:30:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757475AbYJVVa1 (ORCPT ); Wed, 22 Oct 2008 17:30:27 -0400 Received: from nlpi053.sbcis.sbc.com ([207.115.36.82]:40534 "EHLO nlpi053.prodigy.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757018AbYJVVaW (ORCPT ); Wed, 22 Oct 2008 17:30:22 -0400 Date: Wed, 22 Oct 2008 14:28:57 -0700 (PDT) From: Christoph Lameter X-X-Sender: cl@quilx.com To: Miklos Szeredi cc: penberg@cs.helsinki.fi, 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: Message-ID: References: <1223883004.31587.15.camel@penberg-laptop> <48FE6306.6020806@linux-foundation.org> <84144f020810221348j536f0d84vca039ff32676e2cc@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: 1415 Lines: 33 On Wed, 22 Oct 2008, Miklos Szeredi wrote: >> Actually, when debugging is enabled, it's customary to poison the >> object, for example (see free_debug_processing() in mm/slub.c). So we >> really can't "easily ensure" that in the allocator unless we by-pass >> all the current debugging code. Plus the allocator may be reusing parts of the freed object for a freelist etc even if the object is not poisoned. > Thank you, that does actually answer my question. I would still think > it's a good sacrifice to no let the dentries be poisoned for the sake > of a simpler dentry defragmenter. You can simplify defrag by not doing anything in the get() method. That means some of the objects passed to the kick() method may be already have been freed in the interim. The kick method then must be able to determine if the object has already been freed (or is undergoing freeing) by inspecting the object contents (allocations are held off until kick() is complete). It then needs to free only the objects that are still allocated. That way you could get to a one stage system.... If the dentry code can give us that then the approach would become much simpler. -- 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/