[openib-general] [PATCH] CMA / local SA: make local SA module optional for CMA operations

Sean Hefty sean.hefty at intel.com
Thu Feb 2 21:22:58 PST 2006


>This is a good goal but the implementation looks way too crazy.  Can
>we revamp the API to the SA so that this symbol chicanery isn't
>required?  Maybe have an SA core that the cache registers itself with
>when it's loaded?

It's probably not even worth it long term.  I was planning on using the local SA
module to track multicast records.  The code ran without requiring the local SA
module being loaded, which is what I was aiming for.

>Especially this:
>
> > +	if (cache_timeout) {
> > +		EXPORT_SYMBOL(ib_get_path_rec);
> > +	}
>
>I'm sure that putting an EXPORT_SYMBOL inside an if() is not mergeable
>upstream.  Does it even do anything?  As far as I can see from the
>definition of EXPORT_SYBMOL in <linux/module.h>, the symbol will get
>exported anyway.

I had to include the { } around the if() to get this to compile, and couldn't
find anywhere in the code where EXPORT_SYMBOL was called inside a function.  I
finally just gave up looking and tried it to see if it would work.  I'll admit
that I was surprised that the build didn't complain, but I don't know if it
actually prevented that symbol from being exported.

>symbol_get()/symbol_put() is a little suspicious too.

Symbol_get/symbol_put are exported as GPL only, so I don't think that we can use
them anyway.  I was just going to toss this entire patch and let the
cache_timeout parameter be the key to disable the cache for now.

- Sean




More information about the general mailing list