1 |
On Wednesday 30 January 2008, Mateusz Mierzwinski wrote: |
2 |
> Alan McKinnon pisze: |
3 |
|
4 |
> > One could try listing these drivers in /etc/autoload.d/kernel-2.6 |
5 |
> > but the easiest is probably to compile them into the kernel |
6 |
> |
7 |
> You have right. Standard unix kernel was designed to have all inside. |
8 |
> I don't know why some people still prefer modules than monolith |
9 |
> kernel. If you have modules, you must recompile all of them when new |
10 |
> ABI comes out. On monolithic kernel its all there. Also i don't know |
11 |
> if modules are not slower than monolith Kernel because of User space |
12 |
> to Kernel space connection. Compiled in modules makes kernel run |
13 |
> faster, and if it's server, then even 0.00001 sec makes the different |
14 |
> on functions execution and internal core communication. Partly beyond |
15 |
> of that problem is IPC module communication. But if there are |
16 |
> benefits then also are problems with error code execution or beta |
17 |
> drivers installed. Also if You have Molnar's Real Time Preemption |
18 |
> Model on Your kernel, You should choose monolithic kernel. PS: some |
19 |
> drivers are don't work as modules like they should. You see Windows - |
20 |
> there are drivers like Linux modules - what it makes? Blue screens of |
21 |
> death ;), but this is another story... ;) |
22 |
|
23 |
That's an easy answer :-) |
24 |
|
25 |
Standard Unix was designed for systems where you know exactly what |
26 |
hardware you have up front and there are no nasty surprises. Take for |
27 |
example an SGI box. How many PCI chipsets could it possibly have? |
28 |
Exactly one. So you know exactly which driver you will need. |
29 |
|
30 |
Apple are still lucky in this regard, as the only hardware that goes in |
31 |
them is Apple's hardware and kernel configurationis then quite easy. |
32 |
|
33 |
But we use the worst possible design that demented designers could ever |
34 |
come up with - PCs. The range of stuff available is staggering. The |
35 |
amount of dodgy hardware that claims to conform to spec but doesn't is |
36 |
even more staggering. So now exactly which modules are you going to |
37 |
compile in monolithically? What about hotpluggable hardware? As a |
38 |
vendor you have no way of knowing which funky hardware the user will |
39 |
ever plug into a notebook, and you simply cannot compile everything in |
40 |
(never mind the driver conflicts you will have). |
41 |
|
42 |
Gentoo expects their users to compile their own kernels so to a large |
43 |
extent we can make stuff monolithic, apart from the hot-pluggable |
44 |
devices. |
45 |
|
46 |
Binary distros cannot do this. To conserve memory they must load only |
47 |
the drivers for hardware that is actually present, and to do that one |
48 |
needs modules. I don;t know of a binary commercial distro that will |
49 |
gladly still support users who compile their own kernels - they usually |
50 |
stuff it all up gloriously. It's a no-brainer really. |
51 |
|
52 |
I don't buy the speedup argument either and have never seena benchmark |
53 |
that proves modules are slower. The Linux kernel module loader is |
54 |
essentially self-modifying code and inserts modules into kernel space |
55 |
as if they had been there monolithically (within reason of course). |
56 |
Some drivers do behave differently between being modular and |
57 |
monolithic, but this is a function of a crappy coder and not a function |
58 |
of modularity :-) If a piece of kernel code causes a BSOD, then it |
59 |
will probably do it either way it is loadable as the code is probably |
60 |
crappy. |
61 |
|
62 |
A Real Time kernel is not suitable for a PC either - I can't think of |
63 |
any RT application where a PC would be a *GOOD* choice. For that I |
64 |
would be using the embedded arches with a board where as designer I |
65 |
know exactly what is present and what isn't. Monolithic makes more |
66 |
sense in that case. I can imagine why Ingo made that choice - with RT |
67 |
he has to supply certain guarantees and probbaly can't do that with |
68 |
modules coming and going all the time. |
69 |
|
70 |
Basically. modern Linux is essentially unusable without kernel modules. |
71 |
|
72 |
|
73 |
-- |
74 |
Alan McKinnon |
75 |
alan dot mckinnon at gmail dot com |
76 |
-- |
77 |
gentoo-user@l.g.o mailing list |