Monday, June 3, 2013

ZONE_MOVABLE role

In 2.6.20-rc4 in, mel Gorman submitted the patch introduces ZONE_MOVABLE, introducing the pseudo zone is intended to prevent memory fragmentation zone
ZONE_MOVABLE indicates that the zone can only be marked with __GFP_HIGHMEM and __GFP_MOVABLE distribution and use. This makes all non-movable pages are restricted to a single memory area, and movable in the area of ​​memory allocated by other satisfied.
Movable zone by the size of the kernel parameter "kernelcore =" designation. This parameter specifies how much memory is allocated to ZONE_MOVALBE. In ZONE_MOVABLE zone within the pages can be released through migrating or reclaiming lost.
When we choose a zone for ZONE_MOVABLE page, you need to consider two points:
First of all, only at the highest memory zone of memory for ZONE_MOVABLE. For x86 platform, ZONE_HIGHMEM; For ppc64 is ZONE_DMA; For x86_64 is ZONE_DMA32.
Secondly, the kernel memory may be used by a flat distributed across multiple NUMA nodes. If the node is not the same size, it will cause a kernel on different nodes of different amount of memory used.
By default, this zone is not used as huge pages allocation because huge pages allocation is fixed and non-migratable. Provides a sysctl hugepages_treat_as_movable allows ZONE_MOVABLE run huge pages allocated. This means that when the system after the system call is executed, huge page pool dimensions contained ZONE_MOVABLE size.
Apart hugh pages may be non-ovable, no introduction of the other possible cause ZONE_MOVABLE distribution outside debris.

__GFP_MOVABLE
Use this flag to the allocated memory, or you can move through the page migration mechanism, or can be synchronized to the backing storage of the page to recover.

1 comment:

  1. cut-cpy-paste from kernel doc and that too with mistakes, though that purpose of blog is to write your understanding not filling random data from other websites

    ReplyDelete