2.1.76, nfs client, and memory fragmentation

kwrohrer@enteract.com
Sun, 28 Dec 1997 03:48:08 -0600 (CST)


Two NFS-related things: First, I just tried to cp a file over top of a
binary (which was running on the server); cp issued the error:
cp: cannot create regular file `/home/kwrohrer/bin/xnetb': I/O error
and while there was nothing logged on the client, the server did log one
instance of "nfsd[181]: non-standard errno: 26 (Text file busy)" (client
was 2.1.76; server was user nfsd, 2.1.57; ne2000 ISA cards in both boxes).
I'm not sure whose fault this is.

Second, ever since 2.1.60 or so (when allocations were allowed to block
somehow but nothing was done to make a large enough contiguous space
become free), I get queue_glue lacking the memory to reassemble fragments,
escalating to NFS timeouts, whenever I do something (e.g. xv) which is both
memory intensive and net-using. 2.1.65 with the keep-big-free-areas patch
worked okay, but even by 2.1.76 I still get this behavior... Is anyone
addressing it? Or am I just strange, in need of a huger
/proc/sys/vm/freepages, or in need of >32M of RAM?

I was thinking (as I may have mentioned before) of writing a memory
defragmentation function to copy pages around in memory or out to
disk in order to produce larger contiguous spaces and thereby solve
the second problem. I think I've got the function pseudo-coded, and
can write it bottom-up, except I haven't found yet how to determine the
address of the memory management structures for a page given its physical
address (i.e. find the buddy of a free page so I can try to free it...).
But I don't yet see where to put it. kswapd? Somewhere in the depths
of the kmalloc backend? I haven't quite followed the little twisty
maze of function calls, all different, through slab.c and out the
back end...

Any advice would be appreciated; presumably if I do this right it will
end those complaints about floppy and sound DMA buffers too (if a page is
DMA-ok, then the order-whatever hunk of pages which contains it should
be DMA-ok...even if not, the exceptions ought to be rare enough that they
can be special-cased).

Keith (glad you didn't go with Fibonacci buddies...)