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

From: James Manning (jmm@raleigh.ibm.com)
Date: Wed Jan 12 2000 - 14:41:01 EST


[ Wednesday, January 12, 2000 ] Tigran Aivazian wrote:
> In cases where it adds substantial overhead
> of re-walking through the entire list (e.g. get_fs_type which walks
> through file_systems) the caller should (and does) check the return from
> request_module() and only does the extra work if it is == 0.

But the beauty of the macro method is that you have a much (relatively)
smaller kernel as your preprocessor reduces the request_module to -EINVAL
at compile-time and you get to let gcc optimize away (dump dead code :)
the entire chunk of code... you've saved a branch, cache efficiency, etc..

James

-- 
Miscellaneous Engineer --- IBM Netfinity Performance Development

- 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:20 EST