The Ftape Installation Guide - Contrib
You'll need the swapout
(see Installing ftape) utility when
you stumble over messages like `Couldn't allocate dma-buffer #0
'
printed to your kernel message log files.
The following is an attempt to give you some hints why the
swapout
program is needed:
The data on a floppy tape cartridge is organized in entities of 1024 bytes, so called sectors. 32 of those sectors constitute a so called floppy tape segment. When the tape is running (i.e. when you make backups or restore data) there is enough time between two subsequent floppy tape segments to program the floppy tape controller and the DMA controller for the next segment. In essence this means that one needs to transfer the data from the host computer to the floppy tape in 32kb entities. Therefore one needs contiguous pieces of RAM of size 32Kb. The physical RAM of the computer, however, is organized in entities of 4Kb, so called pages. This means that it might be very well the case that there is indeed plenty of free RAM on your computer system, but the RAM is fragmented in a way that the system (Linux) is unable to provide pieces of 32Kb of contiguous memory.
To cope with this problem, there exists a small and ugly, but useful,
utility called swapout
, which does nothing but allocate a huge
chunk of memory, dirty all pages (i.e. force the system to really
allocate those pages) and exit. This forces the Linux kernel to swap out
quite a lot of RAM. As a result, the physical RAM of the computer gets
de-fragmented. The program swapout
takes an optional parameter
that specifies the amount of memory to allocate in megabytes. E.g.
swapout 15
allocates 15 Megs of memory (1). By default swapout
allocates 5 Megs of
memory. It might be necessary to tune this to get reasonable
de-fragmentation of the system's memory. If you own a computer with
plenty of RAM it might be necessary to make swapout
allocate
more than 5 Megs (2).
You may want to automatically run swapout
when
loading the driver with modprobe
. See Insmod ftape.
(1) Note for Un*x novices: once a
process has finished it returns all allocated memory back to the
operating system. A program that allocates, say, 100 Megs of memory,
automatically releases this memory when it ceases to exist. This means
that you needn't worry about swapout
eating up all of the memory
of you computer.
(2) My machine currently has 20 megabytes of RAM and I call swapout with an argument of 15, making it allocate 15 megabytes of memory. Make sure that you have enough swap space ...
Use these buttons to jump to the top menu