lkml.org 
[lkml]   [2000]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.128 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site