Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754881AbZCEBVo (ORCPT ); Wed, 4 Mar 2009 20:21:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752067AbZCEBVg (ORCPT ); Wed, 4 Mar 2009 20:21:36 -0500 Received: from cn.fujitsu.com ([222.73.24.84]:59453 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1750928AbZCEBVf (ORCPT ); Wed, 4 Mar 2009 20:21:35 -0500 Message-ID: <49AF28C4.1000300@cn.fujitsu.com> Date: Thu, 05 Mar 2009 09:20:04 +0800 From: Lai Jiangshan User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Christoph Lameter CC: Andrew Morton , Pekka Enberg , Nick Piggin , "Paul E. McKenney" , Manfred Spraul , Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org Subject: Re: [PATCH -mm 3/6] slub: introduce __kfree_rcu References: <49AD343E.6010903@cn.fujitsu.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 976 Lines: 32 Christoph Lameter wrote: > On Tue, 3 Mar 2009, Lai Jiangshan wrote: > >> + >> +void __kfree_rcu(const void *x, struct rcu_head *rcu) >> +{ >> + call_rcu(rcu, kfree_rcu_callback); >> +} >> +EXPORT_SYMBOL(__kfree_rcu); >> + > > The parameter x is unused why require it? I see that SLOB needs it. Cant > you do a similar trick as in SLUB just calculating the start address of > the object from the rcu address? > The first parameter of __kfree_rcu() is unused in slab,slub,slqb. (I used it before, for CONFIG_SLUB_DEBUG=y ...etc. But I found these debugging code is needless) Object sizes of the memory objects in slob's kmalloc-slab are various. We hardly calculate the start address of the object from the rcu address. Lai -- 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/