linux-l: isapnp

Jens Dreger jens.dreger at physik.fu-berlin.de
Fr Mär 31 23:44:07 CEST 2000


> Module                  Size  Used by
> sb                     34708   0  (unused)
> uart401                 6352   0  [sb]
> sound                  58284   0  [sb uart401]
> soundcore               2788   5  [sb sound]
> nls_cp437               3776   1  (autoclean)
> hisax                 136784   3 
> isdn                  103200   3  [hisax]
> 
> 1. Ich finde es sehr seltsam, daß soundcore gleich 5 mal geladen wird!

Es ist _einmal_ geladen und wird von 5 anderen modulen oder sonstwem
_benutzt_. Das ist ein Referenz-Zaehler, an dem z.B. rmmod erkennen
kann, dass ein Modul nicht aus dem Speicher geworfen werden darf,
weil es eben noch gebraucht wird. Jeder, der ein Modul verwendet,
zaehlt den Zaehler eins rauf und dann wieder eins runter, wenn er
mit dem Modul fertig ist. Vereinfacht gesagt.

Gruss,

Jens.

PS: Die Idee mit dem dauernden Laden und wieder Rauswerfen von
Sound-Modulen wuerde ich streichen. Die Dinger verbrauchen doch kaum
Resourcen, und eine ISA-Karte muss ihre DMA-Buffer in die ersten (waren
es 16 MB ?) Speicher legen. Jedenfalls kann es passieren, dass Du ein
Modul rauswirfst, und Du es dann nicht mehr laden kannst, weil der
Speicher dann weg ist. Siehe dazu /usr/src/linux/Documentation/sound/*.

---schnipp-------------------------------------------------------
Persistent DMA Buffers:

The sound modules normally allocate DMA buffers during open() and
deallocate them during close(). Linux can often have problems allocating
DMA buffers for ISA cards on machines with more than 16MB RAM. This is
because ISA DMA buffers must exist below the 16MB boundry and it is quite
possible that we can't find a large enough free block in this region after
the machine has been running for any amount of time. The way to avoid this
problem is to allocate the DMA buffers during module load and deallocate
them when the module is unloaded. For this to be effective we need to load
the sound modules right after the kernel boots, either manually or by an
init script, and keep them around until we shut down. This is a little
wasteful of RAM, but it guarantees that sound always works.

You have been warned.



Mehr Informationen über die Mailingliste linux-l