Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752194AbbF1Gwz (ORCPT ); Sun, 28 Jun 2015 02:52:55 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:14132 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751741AbbF1Gwt (ORCPT ); Sun, 28 Jun 2015 02:52:49 -0400 X-IronPort-AV: E=Sophos;i="5.13,692,1427752800"; d="scan'208";a="167665535" Date: Sun, 28 Jun 2015 08:52:46 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@localhost6.localdomain6 To: "Dilger, Andreas" cc: Julia Lawall , "Drokin, Oleg" , "kernel-janitors@vger.kernel.org" , Greg Kroah-Hartman , "lustre-devel@lists.lustre.org" , "devel@driverdev.osuosl.org" , "linux-kernel@vger.kernel.org" Subject: LIBCFS_ALLOC In-Reply-To: Message-ID: References: <1434819550-3193-1-git-send-email-Julia.Lawall@lip6.fr> <1434819550-3193-2-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 Content-Length: 1003 Lines: 31 It is not clear that all of the uses of LIBCFS_ALLOC really risk needing vmalloc. For example: lnet/klnds/socklnd/socklnd.c, function ksocknal_accept: ksock_connreq_t *cr; ... LIBCFS_ALLOC(cr, sizeof(*cr)); The definition of ksock_connreq_t is: typedef struct ksock_connreq { struct list_head ksncr_list; /* stash on ksnd_connd_connreqs */ lnet_ni_t *ksncr_ni; /* chosen NI */ struct socket *ksncr_sock; /* accepted socket */ } ksock_connreq_t; This looks like a very small structure. LIBCFS_ALLOC relies on a test on the size, which should be able to be compiled away. libcfs_kvzalloc on the other hand relies on the failure of kmalloc and so the test for that won't be compiled away. Does it matter? julia -- 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/