From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751959AbbEBGCH (ORCPT ); Sat, 2 May 2015 02:02:07 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:63949 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750807AbbEBGCF (ORCPT ); Sat, 2 May 2015 02:02:05 -0400 X-IronPort-AV: E=Sophos;i="5.13,354,1427752800"; d="scan'208";a="138595706" Date: Sat, 2 May 2015 08:02:02 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@localhost6.localdomain6 To: "Drokin, Oleg" cc: Greg Kroah-Hartman , "devel@driverdev.osuosl.org" , "kernel-janitors@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Julia Lawall , "HPDD-discuss@lists.01.org" , "Simmons, James A." , Dan Carpenter Subject: Re: [HPDD-discuss] [PATCH 2/11] Staging: lustre: fld: Use kzalloc and kfree In-Reply-To: Message-ID: References: <1430495482-933-1-git-send-email-Julia.Lawall@lip6.fr> <1430495482-933-11-git-send-email-Julia.Lawall@lip6.fr> <20150501200221.GF14154@mwanda> <9f81478864bc422c9a59cddbaa723052@EXCHCS32.ornl.gov> <20150501204930.GB2265@kroah.com> <20150501205835.GA2692@kroah.com> 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 > Yes, I imagine Julia will include that as the new lustre_kvzalloc() define > to be used in all OBD_ALLOC_LARGE instances. > I can provide the desired code if necessary (it's actually a bit less than trivial > because in some cases we also have that numa-aware node thing). Oleg, If you could send a patch with the proper definition, that would be very helpful, thanks. When that is in place, I can update the uses. thanks, julia > though if we are ok to review that later, then almost a copy of ext4 one would do like this: > void *lustre_kvzalloc(size_t size, gfp_t flags) > { > void *ret; > > ret = kzalloc(size, flags | __GFP_NOWARN); > if (!ret) > ret = __vmalloc(size, flags | __GFP_ZERO, PAGE_KERNEL); > return ret; > } > > > Bye, > Oleg