2.1.125: Locks when running out of ISA DMA buffers ?

storner@image.dk
Mon, 19 Oct 1998 22:33:20 +0200


I've spent part of the day trying to figure out if I have a problem in
the Olicom Token-Ring driver, or if there's a more generic problem
with ISA DMA buffers in Linux 2.1.125.

What happens is that if transfer a large file (with ftp) from a system
equipped with an ISA Token-Ring card that does DMA (the driver does
all of the necessary magic to make sure buffers are below 16 MB), then
after a while the system stalls. From the EIP's I get through
ALT-SysRQ/P, it seems to be trying to allocate buffers - the two EIP's
I get 95% of the time are in __get_free_pages() and kmem_cache_grow().

The test kernel is a vanilla 2.1.125 with the Olicom driver patched
in. I ONLY see the problem with the card running in DMA mode - if
I reconfigure it to do "pseudo DMA" using only I/O ports, the problem
goes away. A PCI card (same driver) does not suffer from the problem
either.

(The driver is available at
ftp://ftp.olicom.dk/releases/Unix-Driver/Linux/oltr-v1.29-102.gz,
if you're interested - it doesn't patch cleanly into 2.1.125, but
the necessary changes are trivial. Email me if you want an updated
patch).

The driver does DMA directly into the skb's - it pre-allocates
a set of 16 buffers for receiving, and tries to replenish this
pool once every second. It will, however, work even if the pool
is not replenished immediately - it just slows down, then.

Transmit buffers also need to be in DMA'able memory; if the network
layer passes a buffer above 16 MB, a new buffer is allocated with
GFP_DMA and data is copied to this buffer before transmission.

I suspect that the driver could get stuck if it cannot get a
transmit buffer - but it seems strange to completely run out of
memory below 16 MB on a mostly idle system (the buffers that the
driver tries to allocate all fit within a single 4K page).

So - is anyone else having problems with ISA DMA cards in 2.1.125 ?

Suggestions on things I can investigate to further narrow down the
problem are also welcome.

-- 
Henrik Storner  |  "testing? What's that? If it compiles, it is good, 
                |   if it boots up it is perfect."
                |                                    Linus Torvalds

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/