Avoid physical memory fragmentation-zone_movable

Source: Internet
Author: User

In 2.6.20-rc6, the patch submitted by Mel Gorman introduces zone_movable to prevent zone memory fragmentation.

Zone_movable indicates that this zone can only be allocated and used with the _ gfp_highmem and _ gfp_movable labels. This limits all non-movable pages to a single memory area, while the allocation of movable is met by other memory areas. This patch can be used with the linked list-based anti-fragment patch.

The size of the movable zone is specified by the Kernel Parameter "kernelcore =. This parameter specifies how much memory is allocated to zone_movalbe. All pages in zone_movable zone can be migrated or recycled.

When we select a zone page for zone_movable, we need to consider two points:

First, only the memory in the highest memory zone can be used for zone_movable. For the x86 ARM platform, zone_highmem is used, zone_dma is used for ppc64, and zone_dma32 is used for x86_64.

Secondly, the memory used by the kernel may be evenly distributed across multiple NUMA nodes. If the size of these nodes is different, the number of memory used by the kernel on different nodes is different.

By default, this zone is not used as a huge pages allocation, because the huge pages allocation is fixed and non-migratable. A sysctl hugepages_treat_as_movable is provided to allow huge pages allocation on zone_movable. This means that after the system executes this system call, the size of the huge page pool contains the size of zone_movable.

Except Hugh pages, which can be non-ovable, the author does not introduce other fragments that may cause zone_movable distribution.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.