Re: [idea] request_module(const char *fmt, ...);

From: Jamie Lokier (lkd@tantalophile.demon.co.uk)
Date: Thu Jan 13 2000 - 09:59:37 EST


Tigran Aivazian wrote:
> just a final confirmation (before I start to irritate someone with a
> multitude of mails) - although I still think macro approach is
> unacceptable, using static inline (thanks to David for pointing out) is
> acceptable but leaves one final question which can only be answered by the
> maker (of decisions):
>
> Q. What is the right design decision for Linux - to have a CONFIG_KMOD
> dependency in the header that declares request_module() or to have
> an extra function call in a non-performance critical code path that
> invokes request_module() but avoid the dependency?

Why don't you compile with

   (a) calls to request_module()
   (b) no calls

and see how much difference it makes to the kernel size? If there's not
much difference, nobody should care that much. request_module() calls
shouldn't be in extremely time critical code anyway. If it makes a big
difference, then its important to be able to disable it somehow.

btw, I think static inline varargs functions are not inlined by GCC, so
you can't use that to optimise away the calls.

You can use this though:

#define request_modulef(fmt...) ((void) 0)

Enjoy,
-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:22 EST