Messages in this thread | | | Date | Wed, 12 Jan 2000 14:41:01 -0500 | From | James Manning <> | Subject | Re: [idea] request_module(const char *fmt, ...); |
| |
[ 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/
| |