|
andrew.mcmillan.net.nz
cd /var/www; more /dev/rant >>index.html
|
|
Unexpected interaction between kernel config options
There was an interesting read the other week on LKML where someone or other was trying to say that no kernel config options should be hidden, and any that are should be turned into options that are linked, so that you can "see what you are doing". At the time Linus posted an excellent rant straight back, saying that more options should be hidden, and that the knobs and twiddles that people see should be obvious. I thought at the time that Linus response on this was extremely appropriate, but I didn't expect to be bitten by the opposite approach quite so immediately! I have been trying to build 2.6.20 for the last few days and wondering where in hell has the "Software Suspend" option gone. Well, today I found out that if you disable "Hot Pluggable CPUs" the option will never appear. If Linus has his way this problem would not happen, because the two knobs that people might want to twiddle, which appear superficially unrelated would actually have three settings in truth:
The first setting would be a user-selectable knob, which would ensure that CONFIG_HOTPLUG_CPU was enabled, regardless of the state of software suspend. The last one would ensure that CONFIG_HOTPLUG_CPU and CONFIG_SOFTWARE_SUSPEND were enabled. The current approach is that iff I enable software suspend, then the hotplug CPU option disappears, and OTOH if I disable hotplug CPUs the software suspend option disappears. What I did was to start with a clean, unconfigured 2.6.20 kernel and go through all of the options starting at the top, which is something I tend to do with new hardware. The idea of hot plug CPUs seemed like something I didn't need, so I disabled it. With Linus' approach I would then have enabled Software Suspend a couple of minutes later, and the hidden config option would have been re-enabled behind the scenes. With the way things are at present, I built a good number of kernels and went through quite a bit of hardware blaming before I grepped .Kconfig for SUSPEND and found out what had happened, and which option I needed to enable. It is nice to know that their is such deep sanity at the heart of the kernel development process! Hopefully someone in a position to do so will notice this particular little gotcha and fix it soon, or perhaps someone wanting an "in" to start kernel hacking could go through the kernel configuration and clean up such gotchas. It certainly seems to me that Linus would accept patches for this as being rational. |
|