Messages in this thread | | | Subject | Re: Counting System Calls | Date | Fri, 17 Apr 1998 14:41:54 -0700 | From | Craig Milo Rogers <> |
| |
>> This would be a useful tool in the context of the proposed >> modular system call mechanism. > >but there is a granularity problem i think. With modules we 'waste' about >2K per module due to 4K page sizes. (every module has to have it's own set >of pages). With 183 syscalls we'd waste much more 'partial pages', about >183*2K=366K resident memory, brrr.
Well, if you want to be that extreme, yes. ;-) I envision a tristate, as for other modules: an individual syscall could be compiled into the kernel, compiled as a module, or excluded entirely. The usual caveats apply.
I think that the preferred approach would be to identify the set of syscalls that are needed for system booting, or are needed to load modules; these would remain compiled into the kernel (although I could make an argument that certain syscalls, such as sethostname, might be used *only* during system bootup and configuration, and might be eligible for removal afterwards). Modularized syscalls would primarily be used for:
1) infrequently-used syscalls
2) rapid development of new syscalls
3) syscalls that are distributed as extensions to the basic kernel
Some people would elect to keep all syscalls compiled into the kernel. Special kernels, such as for installation floppies and/or embedded Linux applications, would be tuneed and tested, perhaps while rewriting application code to use as few syscalls as possible.
Another approach might be to package a group of related syscalls into a single autoloaded module. Perhaps sethostname(), settimeofday(), swapon(), and setdomainname() should constitute a single module that could be unloaded after bootup is complete? Perhaps the rt_sig* syscalls can be made into a single module, which is loaded only if there's a need for them?
Suppose you'd like to automatically unload unused syscalls, too? By taking a snapshot of the syscall execution counts, a suitable daemon (the specifics of which I'd prefer not to spend time speculating on right now) could determine when a syscall module wasn't being used, and unload it.
Craig Milo Rogers
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |