Shrinking Zones

The routines for shrinking zones are (among others) supplied with the following information by the other parts of the kernel:

□ The NUMA section and the memory zones it contains that are to be processed.

□ The number of pages to be swapped out.

□ The maximum number of pages that may be examined to find out if they are suitable for swapping out before the operation is aborted.

□ The priority assigned to the attempt to free pages. This is not a process priority in the classical Unix sense, as this would make little sense in kernel mode anyway, but an integer that specifies how urgently the kernel needs fresh memory. When pages are swapped out in the background as a preventive measure, this need is not as immediate as when, for example, the kernel has detected an acute memory shortage and urgently needs fresh memory to execute or complete an action.

Page selection begins in shrink_zone. However, some more infrastructure must be introduced before we can discuss the code.

Continue reading here: Mmvmscanc

Was this article helpful?

0 0