Comment 0 for bug 1730836

Revision history for this message
Alice Liu (dxliu) wrote :

Description

Huge page helps to reduce TLB miss rate, but it has higher cache footprint, sometimes this may cause some issue. For example, when clearing huge page on x86_64 platform, the cache footprint is 2M. But on a Xeon E5 v3 2699 CPU, there are 18 cores, 36 threads, and only 45M LLC (last level cache). That is, in average, there are 2.5M LLC for each core and 1.25M LLC for each thread. If the cache pressure is heavy when clearing the huge page, and we clear the huge page from the begin to the end, it is possible that the begin of huge page is evicted from the cache after we finishing clearing the end of the huge page. And it is possible for the application to access the begin of the huge page after clearing the huge page.

To help the above situation, when we clear or copy a huge page, the order to clear or copy the sub-pages can be changed to clear or copy the sub-page to access last.

Target Kernel: 4.15
Target Release: 18.04