# Is forcing modules load can cause problems?

## Logicien

HI !

Most of the modules the kernel need to support material are loaded by itself using the modules autoload capability. However, some few needed modules are not load automaticaly by Linux and administrators need to force the load of those modules at boot time or after. Is the order of those modules list have an importance?

When I do an lsmod, the top list are the latest loaded modules and the bottom ... the earliest. When a boot script load my list of modules, including both, modules the kernel can load by itself and not, it possibly change the order the kernel probe material and the autoload fonctionality would load modules by itself if there was no list by me. Is that affect IRQ and memory allocations and can cause Linux disable IRQ and ask for irqpoll parameters for example? I am thinking about this. I have the tendancy to force the fewest has I can the load of modules and let Linux do what he want. Is it better? If you do not understand what I say, please tell me !

 :Very Happy: 

Note I dont try to force the load of modules that are useless for the material of a machine and softwares activity.

----------

## mikegpitt

I had a little trouble with the translation, but I believe you are asking if loading modules that don't autoload at boot is a bad thing, and can the order they are loaded is important.

In my experience forcing some modules to load isn't a problem at all.  In fact, in almost every system I've set up there have been a few modules that I put in my /etc/modules.autoload.d/kernel-2.6 .  Udev will take care of hardware detection and load the appropriate modules (usually), but for anything else you will need to either manually load them or place them in your kernel2.6 file to load at boot.

In rare cases (mostly due to bugs) loading modules in a specific order does matter, but in general it doesn't matter and shouldn't matter.  If a module depends on other modules for functionality it will automatically load them as well.

----------

## NeddySeagoon

Logicien,

It doesn't matter how modules are loaded provided that when you load modules by hand (or in a script) you use modprobe and not insmod.

modprobe has a module dependency tree, so if you load a module, it will silently load any other required modules. insmod, does exactly what its told to do. Its up to you to load modules in the right order. Module load order is important.

This is not linked to IRQs and irqpoll.  The PCI specification demands that cards can share IRQs. Shared IRQs are best implemented by Message Signaled Interrupts (MSI) but this IRQ mechanism is not supported by all hardware yet. It avoids the IRQ handler haveing to poll devices to find out who raised the IRQ. (Thats nothing to do with irqpoll)

When there are problems allocating IRQs, as there often was before APICs were common, as there were just not enough IRQs to go around, then some things ending up being polled instead of using IRQs. It still happens if the kernel is not set up to use the APIC or if a device/driver is badly designed so it will not share an IRQ.

To check for APIC use, look in /proc/interrupts. You should not see XT-PIC.

SMP systems force the use of APIC, since the XT_PIC supports at most once CPU.

----------

## Logicien

Thank-you both for your answers. I know the kernel in plus of autoload have a dependancy mechanism and I dont have to bother with modules dependancy in general. I say general because I remark that the module ath5k have led-class as module dependancy and led-class is not load after I modprobe ath5k. As far as I know, it's the only case I ever seen.

For the modules load order, the allocation of ressources is a lot standardize, I can conceive to that the share of resources minimise the need of a probe and drive support order. Because the Linux kernel tell me

```
 MP-BIOS bug: 8254 timer not connected to IO-APIC
```

when he start to detect material, I use noapic and nolapic boot parameters as a workaround. So it's the PIC who control interrupts, but my HP compaq nx9110 is a monoprocessor anyway. I have not seen any slowdown or instability without APIC, but as I wrote in the topic  [Solved] dead audio channel until maximum volume cpu frequency scaling cause me problems.

----------

## NeddySeagoon

Logicien,

In a single processor system the only advantage of APIC over the XT-PIC is that there are a lot more IRQs, so sharing is much less of an issue.

----------

## Logicien

So the accasionnal kernel message

```
"Who care ... try to use irqpool .."
```

I see more after a reboot than a poweroff, is related to what? It can come with oops resulting with IRQ 18 and/or others disabled on my Netbook Acer Aspire One wtih Intel Atom double harts. I do not disable IO-APIC on that machine.

----------

## NeddySeagoon

Logicien,

Which CPU do you have in your Acer One ? 

I have a Acer One 110, with the 1.6G single core Atom, with hyperthreading. I don't have IRQ problems and my APIC works.

----------

## Logicien

It's a Acer Aspire One AOA150 with a N270 CPU at 800/1600 MHz, one physical hart and two logicals harts.  Sometimes, I have a kernel message who ask for irqpoll boot parameter when I reboot the machine, more then when I boot after I shutdown it with poweroff, That's let me think something like a reboot do not flush all the previous allocated ressources and when the system try to set them again there's some conflicts. A poweroff force a cold boot but a reboot can be warm.

I must say I have 3 laptops. I am using mainly ArchLinux and Debian Sid. The irqpoll message is not specific to my Acer One. I ever seen it on others machines. Most of the time I don't have it. I use now only the generics kernels of my distributions. I have set all of them with irqpoll boot parameter. Even with that, I have seen the message. It's the reason why I want to understand more in depth the conditions of this kernel message.

----------

