Miod Vallat wrote: > > > 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).
Doing this saves around 1.6K on bsd.rd/amd64. Would that be preferred over removing the #ifdefs? text data bss dec hex 4736948 2409000 577536 7723484 75d9dc 4738636 2409000 577536 7725172 75e074 diff --git a/uvm/uvm_amap.h b/uvm/uvm_amap.h index a98b440..a768e94 100644 --- a/uvm/uvm_amap.h +++ b/uvm/uvm_amap.h @@ -119,7 +119,9 @@ boolean_t amap_swap_off(int, int); * ... this is enabled with the "UVM_AMAP_PPREF" define. */ -#define UVM_AMAP_PPREF /* track partial references */ +#ifndef SMALL_KERNEL +# define UVM_AMAP_PPREF /* track partial references */ +#endif /* * here is the definition of the vm_amap structure for this implementation.