This leads to the obvious suggestion that we should be trying to
do something like:
Try and grab a pair; if that works we're done, get out of
here. else:
grab a page.
for the physical pages next to it, try and see if we can swap
them out. Ignore how busy they might be etc, just try
and do it.
if that fails, grab the next page and repeat.
The idea here is that if the page is really busy, what we're really
doing is moving them (they swapout and immediately back in; you can
obviously optimize the process a bit if you feel like it).
Provided that at least half our memory is swapable, this will always
succeed for 8K blocks (in general, provided at least (N-1)/N of our
memory is swapable, it's guarenteed to termate for allocating N
pages).
I suspect the real problem is that (last I looked: a _LONG_ time ago)
it's hard to go from a physical page number to what is actually using
it. Is this still the case?
Michael.
-
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.altern.org/andrebalsa/doc/lkml-faq.html