Port-powerpc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Questions about memory allocation for device drivers.
I have been looking thru the kernel code trying to understand how the kernel
memory allocation works etc. and have noticed a few things.
When the autoconfig routine installs a device driver it mallocs some memory
for the softc device structure and this is passed to the driver to use.
see: sys/kern/subr_autoconf.c config_attach()
The malloc routine allocates memory from kernel space, I am not sure if this
memory is wired down or not. I have noticed that some device drivers use this
memory for buffers (the 16550 com.c driver com_intr() ) while others use the
bus_dma functions ( ethernet etc.) to guarantee they have wired down memory.
Is the softc driver memory wired down? or will it page? It seems to me it
should be wired down and should not page. If they page should the autoconf
routine force the memory to be wired down? This may improve the performance of
device drivers.
Also shouldnt the ISR routines be wired down so they do not page? My
understanding is that kernel code can be paged in and out.
Thanks in advance
--
========================================================================
Mark Milligan
Real Time Systems Inc.
Home |
Main Index |
Thread Index |
Old Index