Can't we check this in __kho_preseve_order() and not duplicate the code?
Yes, that is possible, I will move it in the next version.
Actually, I decided against this. The check might be expensive depending on how sparse scratch area. Why make it even more expensive for kho_preserve_pages() case, which might be calling __kho_preserve_order() multiple times.
Pasha