[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1506280844460.2103@localhost6.localdomain6>
Date: Sun, 28 Jun 2015 08:52:46 +0200 (CEST)
From: Julia Lawall <julia.lawall@...6.fr>
To: "Dilger, Andreas" <andreas.dilger@...el.com>
cc: Julia Lawall <Julia.Lawall@...6.fr>,
"Drokin, Oleg" <oleg.drokin@...el.com>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"lustre-devel@...ts.lustre.org" <lustre-devel@...ts.lustre.org>,
"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: LIBCFS_ALLOC
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists