Hi,

I've been investigating an issue in Ubuntu [1] which nominally relates to 
sysctl. After analysing
the problem [2], it appears that the real problem is that although modprobe 
allows a modules _module
parameters_ to be set at load time, it does not provide a way to set a modules 
sysfs _kernel
parameters_ at load time.

So, modules that specify kernel parameters but *not* module parameters, such as 
the 'bridge' module,
do not get the correct values set when modprobe loads.

The reason is that in Ubuntu we run 'sysctl -ep' as early as possible (for 
options like
kernel.printk). Any settings in /etc/sysctl.* relating to modules that haven't 
yet been loaded
cannot of course be applied. Later, the bridge module is loaded via modprobe. 
However, the bridges
fail to start since their settings are incorrect (as the required settings are 
in /etc/sysctl.*, but
sysctl has now finished).

One possible solution to the problem would be to mandate that all modules which 
have configurable
kernel parameters also provide equivalent module parameters to allow those 
values to be set at load
time.

Another possible solution might be for modprobe to extract the relevant bits 
from sysctl and apply
them somehow(?)

The approach adopted for Ubuntu currently is to simply call sysctl *twice* - 
once as early as
possible, and again after all network interfaces are up. This seems like the 
best we can do
currently, but it isn't perfect since it only fixes the problem for network 
devices.

I'd be interested in your thoughts on a holistic solution to this issue.

Kind regards,

James.

[1] - https://bugs.launchpad.net/ubuntu/+source/procps/+bug/771372
[2] - https://bugs.launchpad.net/ubuntu/+source/procps/+bug/771372/comments/4

--
James Hunt
____________________________________
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to