That's the right idea, it's just not necessary to use slab cache to achieve
it. Actually, to handle huge (hardware) pages efficiently, my first instinct
is to partition them into their own largish chunks as well, and allocate new
chunks as necessary. To get rid of a chunk (because freespace of that type
of chunk has fallen below some threshold) it has to be entirely empty, which
can be accomplished using the same move logic as for defragmentation.
You're right to be worried about intrusion of unmovable pages into regions
that are supposed to be defraggable. It's very easy for some random kernel
code to take a use count on a page and hang onto it forever, making the page
unmovable. My hope is that:
- This doesn't happen much
- Code that does that can be cleaned up
- Even when it happens it won't hurt much
- If all of the above fails, fix the api for the offending code or create
a new one
- If that fails too, give up.
Regards,
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/