[ewg] iw_cxgb3 genalloc memory allocator dependency

Steve Wise swise at opengridcomputing.com
Mon Oct 29 08:10:14 PDT 2007


The iw_cxgb3 module depends on the linux kernel genalloc service.  This 
service gets compiled into the kernel _only_ if another subsystem has a 
config dependency on the genalloc module (CONFIG_GENERIC_ALLOCATOR). In 
addtion, there are only two users of this service:  iw_cxgb3 and some 
IA64 subsystem.  So on a kernel.org kernel that has iw_cxgb3, genalloc 
gets built into the kernel when you enable the iw_cxgb3 module.  But on 
non IA64 platforms that do not have iw_cxgb3 configured in, the genalloc 
code is not pulled into the kernel.

The side affect of this is that if one tries to compile OFED on a 
kernel.org kernel that doesn't have iw_cxgb3 configured, the genalloc 
server is not available and ofed doesn't compile.

Now, ofed has a backport of genalloc to support older kernels that do 
not even have the genalloc service.  But we don't pull in that backport 
for kernels that do have genalloc.  Thus the problem...

I'm looking for suggestions on how and if we should do something about 
this?  Here are some ideas:

1) always build in our own genalloc service as a backport.  This solves 
the problem, but duplicates the code if it is indeed built into the kernel.

2) detect and ofed config time if we need the genalloc service or not. 
Then pull in the backport as needed.  This one is nice in that it won't 
replicate the gencalloc code when not needed, but at the expense of 
adding complexity to the configure script for ofed.  I'm not really sure 
how to do it at all.  But maybe vlad knows how?


Thoughts?

BTW: bug 767 opened to track this.

Thanks,

Steve.



More information about the ewg mailing list