Hey everyone,
When the sys_swapoff() routine is attempting to deactivate a swap area
it checks to make sure there is enough free space to swap-in the
required new page frames from the deactivating swap device. In
__vm_enough_memory it adds to the free variable counting all currently
active swap pages, including from the device that is to be deactivated,
with:
free += get_nr_swap_pages();
My question/confusion is, why doesn't the kernel have code in
place to exclude free swap pages from the device that is to be
deactivated when __vm_enough_memory is used for this purpose?
Is it because it would require reworking too much of what approximately
works now? In other words, is this a cost/benefit decision to not have
that added logic? Or perhaps I'm just misunderstanding how something is
supposed to work?
Thanks,
--
Colin Hamilton <colin.hamilton@xxxxxxxx>
SUSE
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies