> It seems per-page reference counting is used since forever. I think > there's no reason to ever turn it off (and track referenced pages > with less accuracy, causing leaks).
Actually, assuming the #undef code path works, it might work keeping this and only defining UVM_AMAP_PPREF iff defined(SMALL_KERNEL).