From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751462AbbECFxO (ORCPT ); Sun, 3 May 2015 01:53:14 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:22209 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750989AbbECFxH (ORCPT ); Sun, 3 May 2015 01:53:07 -0400 X-IronPort-AV: E=Sophos;i="5.13,359,1427752800"; d="scan'208";a="114322515" Date: Sun, 3 May 2015 07:53:04 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@localhost6.localdomain6 To: "Drokin, Oleg" cc: Julia Lawall , "" , "Dilger, Andreas" , Greg Kroah-Hartman , "" , "" , "" Subject: Re: [PATCH] staging: lustre: obd_support: Add obd_cpt_alloc function In-Reply-To: Message-ID: References: <1430601408-12847-1-git-send-email-Julia.Lawall@lip6.fr> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2 May 2015, Drokin, Oleg wrote: > > On May 2, 2015, at 5:16 PM, Julia Lawall wrote: > > > Summarize OBD_CPT_ALLOC_GFP, OBD_CPT_ALLOC, and OBD_CPT_ALLOC_PTR as a > > function, obd_cpt_alloc. > > > > Signed-off-by: Julia Lawall > > > > --- > > > > Some questions: Is the name OK? Is the NULL test needed? If not, should > > the call to kzalloc_node with the call to cfs_cpt_spread_node just be > > inlined into the call sites? > > I think we don't need this function at all, we can use kzalloc/kzalloc_node directly with cfs_cpt_spread_node call in. So everywhere the CPT macro is called, it is known that the value is not NULL? I looked at some call sites, but it's not obvious to determine that. > What we do need is obd_cpt_alloc_large similar to how we need > obd_alloc_large (I know I still owe you a proper patch with that). The > only differences between the two would then be passing down of the cpt > (and it's use) or not. I saw that patch. Thanks. julia