Currently the paging mechanism pays no attention to the details of any
pending memory demand, save for whether each request can be granted.
Network I/O can run into major problems in the case where memory is
fragmented, because it requests order-2 chunks of memory and now blocks
if no chunk that large is available. Zlatko Calusic recently posted
a patch which makes sure at least half the minimum free pages are in
groups of order 2 or greater, but AFAIK even that patch just evicts
more pages until it gets enough large free areas.
It would be nice to see (and I may attempt) a patch which keeps track
of pending allocations of each (order, ISA DMA capable) pair, and
which actually tailors paging activity to create appropriate spaces,
possibly shuffling pages about in memory to create the desired
free spaces. This would solve both the no free DMA memory problems
the sound and floppy drivers exhibit, and the memory fragmentation
problems the new blocking policy imposes on the network layer,
without throwing out (possibly quite many) pages we didn't need to
throw out in the process.
Keith