Constant MAX_SWAPFILES_SHIFT
pub const MAX_SWAPFILES_SHIFT: i32 = 5;
Available on crate feature
dep_nc
only.Expand description
MAX_SWAPFILES
defines the maximum number of swaptypes: things which can
be swapped to.
The swap type and the offset into that swap type are encoded into pte’s and
into pgoff_t's
in the swapcache.
Using five bits for the type means that the maximum number of swapcache pages
is 27 bits on 32-bit-pgoff_t
architectures.
And that assumes that the architecture packs the type/offset into the pte as 5/27 as well.