Determination and Analysis of Working sets in xen iterative copy

Source: Internet
Author: User

Based on the page usage, xen divides the migrated memory pages into three types: to_send, to_skip, and to_fix.
With these three page bitmaps, you can easily set and select objects for each round of migration. The three bitmaps are defined in tools/libxc/xc_linux_save.c and are pointer types.
The three bitmaps are described as follows:

  1. To_send: Mark the dirty pages in the previous iteration, that is, the pages to be transmitted in this iteration;
  2. To_skip: Mark the pages that are not uploaded in this iteration;
  3. To_fix: Mark the pages that are transferred only during the last downtime copy phase

In fact, the pages in the to_send bitmap are modified during the previous iteration. You only need to copy the previous dirty page bitmap to to_send before the iteration starts. During the first iteration, all to_send bits must be set to 1.

To_skip is a bitmap introduced by xen to reduce repeated page retransmission. It records the pages that can be skipped due to frequent changes, you can regularly view dirty page bitmaps to find pages with frequent changes.

To_fix is the pages that have not been mapped. These pages are placed in the last transmission round.


The following describes how to determine the xen working set:

  • After each iteration starts, call the xc_shadow_control () function to copy the dirty page bitmap to the to_skip bitmap.
  • Compare the pages in to_send and to_skip. to_send is the dirty page in the previous iteration process. to_skip is the dirty page from the current iteration to the present, the page appears simultaneously in to_send and to_skip (that is, test_bit (n, to_send )&&! Test_bit (n, to_skip) Conditions) can be considered to be more frequent, these pages do not need to be transferred this round.
  • Before the end of this iteration, call the clear operation of xc_shadow_control () to copy the dirty page bitmap to the to_send bitmap and then clear it.

The xc_shadow_control () function provides two bitmap operations. The usage is as follows:

  1. The clear operation (xen_domctl_shadow_op _ clean) actually completes two tasks: first copying the dirty page bitmap to the specified bitmap, and then clearing the dirty page. This operation is usually used to save the contents of the dirty page bitmap to the to_send bitmap before a new iteration starts, and clear the dirty page bitmap.
  2. View operation (xen_domctl_shadow_op_peek), only copies the dirty page bitmap to the specified bitmap, and does not modify the dirty page bitmap. This operation is usually used to locate pages in the to_skip bitmap.



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.