lkml.org 
[lkml]   [2015]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectLIBCFS_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


\
 
 \ /
  Last update: 2015-06-28 09:21    [W:0.159 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site